summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-02-12 09:54:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-14 11:42:19 +0000
commitb5b8003a0b99fb591f2e2a0a5ed74e60a120dc87 (patch)
treedc2c9b361a74923b39f75c5b1dc0f845a335051d /meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
parentf6b39575fb4cbc7cd9f7fbe57562ebca8901d59d (diff)
downloadpoky-b5b8003a0b99fb591f2e2a0a5ed74e60a120dc87.tar.gz
ltp: Upgrade to 20160126 and fix build on musl
pass -D__SANE_USERSPACE_TYPES__ to CFLAGS MIPS64/PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h prevents 64-bit userland from seeing this definition, instead defaulting to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get int-ll64.h included. (From OE-Core rev: d17984eda9635f98d4472019d4af83f661b4dfe7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
new file mode 100644
index 0000000000..c8cbe580c4
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
@@ -0,0 +1,71 @@
1From b216435bb362df10c45f544b78d8c884eaa901fd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 8 Jan 2016 07:01:02 +0000
4Subject: [PATCH 21/32] Define _GNU_SOURCE for MREMAP_MAYMOVE definition
5
6musl guards MREMAP_MAYMOVE with _GNU_SOURCE unlike glibc which uses
7__USE_GNU
8
9Fixes errors like
10error: 'MREMAP_MAYMOVE' undeclared (first use in this function)
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 testcases/kernel/syscalls/mremap/mremap01.c | 4 +++-
15 testcases/kernel/syscalls/mremap/mremap02.c | 2 ++
16 testcases/kernel/syscalls/mremap/mremap03.c | 2 ++
17 3 files changed, 7 insertions(+), 1 deletion(-)
18
19diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c
20index d63d1e4..24ca174 100644
21--- a/testcases/kernel/syscalls/mremap/mremap01.c
22+++ b/testcases/kernel/syscalls/mremap/mremap01.c
23@@ -76,10 +76,12 @@
24 */
25 #include <unistd.h>
26 #include <errno.h>
27+#include <fcntl.h>
28+#define _GNU_SOURCE
29 #define __USE_GNU
30 #include <sys/mman.h>
31 #undef __USE_GNU
32-#include <fcntl.h>
33+#undef _GNU_SOURCE
34
35 #include "test.h"
36
37diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c
38index 5a51b9a..a530a6b 100644
39--- a/testcases/kernel/syscalls/mremap/mremap02.c
40+++ b/testcases/kernel/syscalls/mremap/mremap02.c
41@@ -75,9 +75,11 @@
42 #include <errno.h>
43 #include <unistd.h>
44 #include <fcntl.h>
45+#define _GNU_SOURCE
46 #define __USE_GNU
47 #include <sys/mman.h>
48 #undef __USE_GNU
49+#undef _GNU_SOURCE
50
51 #include "test.h"
52
53diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
54index 12e3829..9b39f8b 100644
55--- a/testcases/kernel/syscalls/mremap/mremap03.c
56+++ b/testcases/kernel/syscalls/mremap/mremap03.c
57@@ -76,9 +76,11 @@
58 #include <errno.h>
59 #include <unistd.h>
60 #include <fcntl.h>
61+#define _GNU_SOURCE
62 #define __USE_GNU
63 #include <sys/mman.h>
64 #undef __USE_GNU
65+#undef _GNU_SOURCE
66
67 #include "test.h"
68
69--
702.7.0
71