Skip to content

Commit 35f3401

Browse files
alan-maguirerichardweinberger
authored andcommitted
um: falloc.h needs to be directly included for older libc
When building UML with glibc 2.17 installed, compilation of arch/um/os-Linux/file.c fails due to failure to find FALLOC_FL_PUNCH_HOLE and FALLOC_FL_KEEP_SIZE definitions. It appears that /usr/include/bits/fcntl-linux.h (indirectly included by /usr/include/fcntl.h) does not include falloc.h with an older glibc, whereas a more up-to-date version does. Adding the direct include to file.c resolves the issue and does not cause problems for more recent glibc. Fixes: 50109b5 ("um: Add support for DISCARD in the UBD Driver") Cc: Brendan Higgins <[email protected]> Signed-off-by: Alan Maguire <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Acked-By: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent e355b2f commit 35f3401

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/um/os-Linux/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <errno.h>
99
#include <fcntl.h>
1010
#include <signal.h>
11+
#include <linux/falloc.h>
1112
#include <sys/ioctl.h>
1213
#include <sys/mount.h>
1314
#include <sys/socket.h>

0 commit comments

Comments
 (0)