1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

Add sys/file.h for LOCK_

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);
|       |                                  ^~~~~~~

(cherry picked from commit 19df770fe14da601d4e54e1592c11c10ffe4df5a)
This commit is contained in:
Pavel Zhukov 2022-06-21 08:23:00 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent a82d8d1916
commit b777390814
5 changed files with 5 additions and 0 deletions

View 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>

View 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>

View 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>

View 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>

View 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"