Discussion:
[PATCH] vmcore-dmesg: Define _GNU_SOURCE
Khem Raj
2016-01-10 01:21:22 UTC
Permalink
loff_t is guarded with _GNU_SOURCE on some C library implementations
e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
include this define, it should help compiling on musl while nothing
changes for glibc based systems since there _GNU_SOURCE is already
defined

Signed-off-by: Khem Raj <***@gmail.com>
---
vmcore-dmesg/vmcore-dmesg.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0364636..a8f56df 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -1,4 +1,5 @@
#define _XOPEN_SOURCE 600
+#define _GNU_SOURCE
#define _LARGEFILE_SOURCE 1
#define _FILE_OFFSET_BITS 64
#include <endian.h>
--
2.7.0
David Woodhouse
2017-03-08 19:44:40 UTC
Permalink
Post by Khem Raj
loff_t is guarded with _GNU_SOURCE on some C library implementations
e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
include this define, it should help compiling on musl while nothing
changes for glibc based systems since there _GNU_SOURCE is already
defined
This appears to still be needed...
Post by Khem Raj
---
 vmcore-dmesg/vmcore-dmesg.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0364636..a8f56df 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -1,4 +1,5 @@
 #define _XOPEN_SOURCE 600
+#define _GNU_SOURCE
 #define _LARGEFILE_SOURCE 1
 #define _FILE_OFFSET_BITS 64
 #include
Simon Horman
2017-03-10 09:12:10 UTC
Permalink
Post by David Woodhouse
Post by Khem Raj
loff_t is guarded with _GNU_SOURCE on some C library implementations
e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
include this define, it should help compiling on musl while nothing
changes for glibc based systems since there _GNU_SOURCE is already
defined
This appears to still be needed...
For some reason it did not hit my inbox :(

Shall I pick up the version you reposted as PATCH 7/7 ?
Post by David Woodhouse
Post by Khem Raj
---
 vmcore-dmesg/vmcore-dmesg.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
index 0364636..a8f56df 100644
--- a/vmcore-dmesg/vmcore-dmesg.c
+++ b/vmcore-dmesg/vmcore-dmesg.c
@@ -1,4 +1,5 @@
 #define _XOPEN_SOURCE 600
+#define _GNU_SOURCE
 #define _LARGEFILE_SOURCE 1
 #define _FILE_OFFSET_BITS 64
 #include
_______________________________________________
kexec mailing list
http://lists.infradead.org/mailman/listinfo/kexec
David Woodhouse
2017-03-10 09:38:35 UTC
Permalink
Post by Simon Horman
For some reason it did not hit my inbox :(
Shall I pick up the version you reposted as PATCH 7/7 ?
That works. There's a github PR too if that's easier to consume. Which
wasn't *intended* to include this patch as it was for the uImage bits,
but I made it from the wrong branch and didn't bother to redo it.
Simon Horman
2017-03-13 09:04:37 UTC
Permalink
Post by David Woodhouse
Post by Simon Horman
For some reason it did not hit my inbox :(
Shall I pick up the version you reposted as PATCH 7/7 ?
That works. There's a github PR too if that's easier to consume. Which
wasn't *intended* to include this patch as it was for the uImage bits,
but I made it from the wrong branch and didn't bother to redo it.
Thanks, its rather convenient for me that it did include the patch in
question. I have applied the series.

Loading...