aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
blob: 90c2f6e0ec51ba6f2e1d3bff30c8209c7387e7e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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