[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1584466534-13248-1-git-send-email-alan.maguire@oracle.com>
Date: Tue, 17 Mar 2020 17:35:34 +0000
From: Alan Maguire <alan.maguire@...cle.com>
To: jdike@...toit.com, richard@....at, anton.ivanov@...bridgegreys.com,
alex.dewar@....co.uk, erelx.geron@...el.com,
johannes.berg@...el.com, arnd@...db.de,
linux-um@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, brendanhiggins@...gle.com,
Alan Maguire <alan.maguire@...cle.com>
Subject: [PATCH] arch/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: 50109b5a03b4 ("um: Add support for DISCARD in the UBD Driver")
Cc: Brendan Higgins <brendanhiggins@...gle.com>
Signed-off-by: Alan Maguire <alan.maguire@...cle.com>
---
arch/um/os-Linux/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index fbda105..5c819f8 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>
--
1.8.3.1
Powered by blists - more mailing lists