]> code.ossystems Code Review - openembedded-core.git/commitdiff
kexec-tools: Define _GNU_SOURCE for getting loff_t definition
authorKhem Raj <raj.khem@gmail.com>
Sun, 10 Jan 2016 01:25:35 +0000 (17:25 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jan 2016 23:42:52 +0000 (23:42 +0000)
Fixes errors e.g.

vmcore-dmesg/vmcore-dmesg.c:370:32: error: unknown type name 'loff_t'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch [new file with mode: 0644]
meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb

diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
new file mode 100644 (file)
index 0000000..90c2f6e
--- /dev/null
@@ -0,0 +1,31 @@
+From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jan 2016 17:16:16 -0800
+Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
+
+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 <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ 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
+
index 866441b531ad0ec37f44292ad1ef048b7148c304..8ca6f27d819233f3ab7b5a53e37d7891bb5389d5 100644 (file)
@@ -7,6 +7,7 @@ SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
             file://kexec-x32.patch \
             file://0002-powerpc-change-the-memory-size-limit.patch \
             file://0001-purgatory-Pass-r-directly-to-linker.patch \
+            file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
          "
 
 SRC_URI[md5sum] = "86de066859f289048f1b286af6f03f78"