aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Maguire <alan.maguire@oracle.com>2020-03-17 17:35:34 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-23 10:38:17 +0200
commit341ec2df1b61cfb7da1dc41dee01f8bed221aa04 (patch)
treef6546d6c78f231444a1cd83241eb69cd6f920bef
parent245a2768b370b457d8557951120e78f579e21719 (diff)
downloadlinux-yocto-341ec2df1b61cfb7da1dc41dee01f8bed221aa04.tar.gz
linux-yocto-341ec2df1b61cfb7da1dc41dee01f8bed221aa04.tar.bz2
linux-yocto-341ec2df1b61cfb7da1dc41dee01f8bed221aa04.zip
um: falloc.h needs to be directly included for older libc
[ Upstream commit 35f3401317a3b26aa01fde8facfd320f2628fdcc ] 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: 50109b5a03b4 ("um: Add support for DISCARD in the UBD Driver") Cc: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/um/os-Linux/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index fbda10535dab..5c819f89b8c2 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <linux/falloc.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/socket.h>