diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-03-22 15:54:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:16 +0000 |
commit | 4aa08b897628ef43adc9c3aa86bdf32499c328c1 (patch) | |
tree | d284df1f9d1fac9fdaff77282c09e4584c8e0388 /meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch | |
parent | 959b7f204ea009fcf4ff0de30522ecf17cb64488 (diff) | |
download | poky-4aa08b897628ef43adc9c3aa86bdf32499c328c1.tar.gz |
ltp: Fix build on x86/musl
In last patch it covered out the non-glibc case well
but did not define else case, when __GLIBC__ is not
defined, as a result errors like
| getcpu01.c:107:41: error: use of undeclared identifier 'sys_support'
| if (((tst_kvercmp(2, 6, 20)) < 0) || !(sys_support)) {
appeared, fixed it with this updated patch
(From OE-Core rev: 04cbc4834076fef6b46af4c5c66046862de7634d)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch new file mode 100644 index 0000000000..868e1cf1fa --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 22 Mar 2016 15:47:14 +0000 | ||
4 | Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU | ||
5 | |||
6 | on x86, we use uc_mcontext element from sigcontext | ||
7 | which is marked gnu-specific in glibc, this patch | ||
8 | adds this condition around the code | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | testcases/kernel/mem/mtest06/shmat1.c | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c | ||
18 | index 0d6d7a4..bee69f6 100644 | ||
19 | --- a/testcases/kernel/mem/mtest06/shmat1.c | ||
20 | +++ b/testcases/kernel/mem/mtest06/shmat1.c | ||
21 | @@ -111,7 +111,7 @@ int done_shmat = 0; /* disallow read and writes before shmat */ | ||
22 | static void sig_handler(int signal, /* signal number, set to handle SIGALRM */ | ||
23 | int code, struct ucontext *ut) | ||
24 | { /* contains pointer to sigcontext structure */ | ||
25 | -#ifdef __i386__ | ||
26 | +#if defined(__i386__) && defined(__USE_GNU) | ||
27 | unsigned long except; /* exception type. */ | ||
28 | int ret = 0; /* exit code from signal handler. */ | ||
29 | struct sigcontext *scp = /* pointer to sigcontext structure */ | ||
30 | @@ -122,7 +122,7 @@ static void sig_handler(int signal, /* signal number, set to handle SIGALRM | ||
31 | fprintf(stdout, "Test ended, success\n"); | ||
32 | exit(0); | ||
33 | } | ||
34 | -#ifdef __i386__ | ||
35 | +#if defined(__i386__) && defined(__USE_GNU) | ||
36 | else { | ||
37 | except = scp->trapno; | ||
38 | fprintf(stderr, "signal caught - [%d] ", signal); | ||
39 | -- | ||
40 | 1.9.1 | ||
41 | |||