* [PATCH] arch/um: falloc.h needs to be directly included for older libc
@ 2020-03-17 17:35 Alan Maguire
2020-03-17 19:00 ` Brendan Higgins
2020-03-20 15:57 ` Anton Ivanov
0 siblings, 2 replies; 4+ messages in thread
From: Alan Maguire @ 2020-03-17 17:35 UTC (permalink / raw)
To: jdike, richard, anton.ivanov, alex.dewar, erelx.geron,
johannes.berg, arnd, linux-um
Cc: linux-kernel, brendanhiggins, Alan Maguire
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arch/um: falloc.h needs to be directly included for older libc
2020-03-17 17:35 [PATCH] arch/um: falloc.h needs to be directly included for older libc Alan Maguire
@ 2020-03-17 19:00 ` Brendan Higgins
2020-03-20 15:57 ` Anton Ivanov
1 sibling, 0 replies; 4+ messages in thread
From: Brendan Higgins @ 2020-03-17 19:00 UTC (permalink / raw)
To: Alan Maguire
Cc: Jeff Dike, Richard Weinberger, Anton Ivanov, alex.dewar,
erelx.geron, Johannes Berg, Arnd Bergmann, linux-um,
Linux Kernel Mailing List
On Tue, Mar 17, 2020 at 10:38 AM Alan Maguire <alan.maguire@oracle.com> wrote:
>
> 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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arch/um: falloc.h needs to be directly included for older libc
2020-03-17 17:35 [PATCH] arch/um: falloc.h needs to be directly included for older libc Alan Maguire
2020-03-17 19:00 ` Brendan Higgins
@ 2020-03-20 15:57 ` Anton Ivanov
2020-03-29 21:41 ` Richard Weinberger
1 sibling, 1 reply; 4+ messages in thread
From: Anton Ivanov @ 2020-03-20 15:57 UTC (permalink / raw)
To: Alan Maguire, jdike, richard, alex.dewar, erelx.geron,
johannes.berg, arnd, linux-um
Cc: brendanhiggins, linux-kernel
On 17/03/2020 17:35, Alan Maguire wrote:
> 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>
> ---
> 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>
>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arch/um: falloc.h needs to be directly included for older libc
2020-03-20 15:57 ` Anton Ivanov
@ 2020-03-29 21:41 ` Richard Weinberger
0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2020-03-29 21:41 UTC (permalink / raw)
To: Anton Ivanov
Cc: Alan Maguire, Jeff Dike, Richard Weinberger, alex.dewar,
erelx.geron, Berg, Johannes, Arnd Bergmann, linux-um,
Brendan Higgins, LKML
On Fri, Mar 20, 2020 at 4:58 PM Anton Ivanov
<anton.ivanov@cambridgegreys.com> wrote:
>
>
>
> On 17/03/2020 17:35, Alan Maguire wrote:
> > 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>
> > ---
> > 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>
> >
>
> Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Applied, thanks!
BTW: Anton & Brendan, thanks a lot for reviewing all these patches!
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-29 21:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 17:35 [PATCH] arch/um: falloc.h needs to be directly included for older libc Alan Maguire
2020-03-17 19:00 ` Brendan Higgins
2020-03-20 15:57 ` Anton Ivanov
2020-03-29 21:41 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).