]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add sys/file.h for LOCK_
authorPavel Zhukov <pavel.zhukov@huawei.com>
Tue, 21 Jun 2022 06:23:00 +0000 (08:23 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 21 Jun 2022 15:07:58 +0000 (16:07 +0100)
Fixes build with musl:
| ../git/src/shared/dissect-image.c: In function 'mount_image_privately_interactively':
| ../git/src/shared/dissect-image.c:2986:34: error: 'LOCK_SH' undeclared (first use in this function)
|  2986 |         r = loop_device_flock(d, LOCK_SH);
|       |                                  ^~~~~~~

src/core/namespace.c
src/dissect/dissect.c
src/shared/dissect-image.c
src/sysext/sysext.c
src/test/test-loop-block.c

index ffa236cc887deea7a10dcb58f3f9c5a36342e6f8..c5ad918a2f0002796d9b7015cf376ababfcc1c2a 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/loop.h>
 #include <sched.h>
 #include <stdio.h>
+#include <sys/file.h>
 #include <sys/mount.h>
 #include <unistd.h>
 #include <linux/fs.h>
index 0239d9b394f84f9eda6b8c348abc657cf011abf1..4e39f959cfe8eb0cf9ca561b4c785fee1f4e9660 100644 (file)
@@ -4,6 +4,7 @@
 #include <getopt.h>
 #include <linux/loop.h>
 #include <stdio.h>
+#include <sys/file.h>
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 
index 6885b14bb25b59df581179f09f6129489a7005ca..36174f8743de74a09b41379f83c79dc52f890550 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/blkpg.h>
 #include <linux/dm-ioctl.h>
 #include <linux/loop.h>
+#include <sys/file.h>
 #include <sys/mount.h>
 #include <sys/prctl.h>
 #include <sys/wait.h>
index 002ebb09f8dea42bef3f90fbdb2d7589e22f5304..b81f1ebe73cbfbed0f2e8f538927e73c59802127 100644 (file)
@@ -3,6 +3,7 @@
 #include <fcntl.h>
 #include <getopt.h>
 #include <linux/loop.h>
+#include <sys/file.h>
 #include <sys/mount.h>
 #include <unistd.h>
 
index d1793222f0ee07f8e8b72d06f135a687a488ddab..9179ef5d608cea244bfbb25f902e524905818468 100644 (file)
@@ -3,6 +3,7 @@
 #include <fcntl.h>
 #include <linux/loop.h>
 #include <pthread.h>
+#include <sys/file.h>
 
 #include "alloc-util.h"
 #include "dissect-image.h"