diff options
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.patch | 71 |
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 @@ | |||
1 | From b216435bb362df10c45f544b78d8c884eaa901fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 8 Jan 2016 07:01:02 +0000 | ||
4 | Subject: [PATCH 21/32] Define _GNU_SOURCE for MREMAP_MAYMOVE definition | ||
5 | |||
6 | musl guards MREMAP_MAYMOVE with _GNU_SOURCE unlike glibc which uses | ||
7 | __USE_GNU | ||
8 | |||
9 | Fixes errors like | ||
10 | error: 'MREMAP_MAYMOVE' undeclared (first use in this function) | ||
11 | |||
12 | Signed-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 | |||
19 | diff --git a/testcases/kernel/syscalls/mremap/mremap01.c b/testcases/kernel/syscalls/mremap/mremap01.c | ||
20 | index 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 | |||
37 | diff --git a/testcases/kernel/syscalls/mremap/mremap02.c b/testcases/kernel/syscalls/mremap/mremap02.c | ||
38 | index 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 | |||
53 | diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c | ||
54 | index 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 | -- | ||
70 | 2.7.0 | ||
71 | |||