summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch57
-rw-r--r--meta/recipes-extended/ltp/ltp_20180926.bb3
2 files changed, 59 insertions, 1 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch b/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
new file mode 100644
index 0000000000..d0c847774d
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
@@ -0,0 +1,57 @@
1From c9edb0eaaca83c18ac7b5ea3330faad8d47d3fd1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 14 Dec 2018 06:44:02 -0800
4Subject: [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29
5
6glibc has added getcpu() API starting with glibc 2.29 release, this
7makes the static function in conflict and signatures are not same as
8well.
9
10Renaming helps to keep ltp build going
11
12Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2018-December/010321.html]
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 testcases/kernel/syscalls/getcpu/getcpu01.c | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
18
19diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
20index c927512ca..e850fe844 100644
21--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
22+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
23@@ -82,7 +82,7 @@ int sys_support = 0;
24
25 void cleanup(void);
26 void setup(void);
27-static inline int getcpu(unsigned int *, unsigned int *, void *);
28+static inline int get_cpu(unsigned int *, unsigned int *, void *);
29 unsigned int set_cpu_affinity(void);
30 unsigned int get_nodeid(unsigned int);
31 unsigned int max_cpuid(size_t, cpu_set_t *);
32@@ -124,7 +124,7 @@ int main(int ac, char **av)
33 #ifdef __i386__
34 node_set = get_nodeid(cpu_set);
35 #endif
36- TEST(getcpu(&cpu_id, &node_id, NULL));
37+ TEST(get_cpu(&cpu_id, &node_id, NULL));
38 if (TEST_RETURN == 0) {
39 if (cpu_id != cpu_set) {
40 tst_resm(TFAIL, "getcpu() returned wrong value"
41@@ -157,10 +157,10 @@ int main(int ac, char **av)
42 }
43
44 /*
45- * getcpu() - calls the system call
46+ * get_cpu() - calls the system call
47 */
48-static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
49- void *cache_struct)
50+static inline int get_cpu(unsigned *cpu_id, unsigned *node_id,
51+ void *cache_struct)
52 {
53 #if defined(__i386__)
54 return syscall(318, cpu_id, node_id, cache_struct);
55--
562.20.0
57
diff --git a/meta/recipes-extended/ltp/ltp_20180926.bb b/meta/recipes-extended/ltp/ltp_20180926.bb
index e471904d8e..6cfcaa5832 100644
--- a/meta/recipes-extended/ltp/ltp_20180926.bb
+++ b/meta/recipes-extended/ltp/ltp_20180926.bb
@@ -51,7 +51,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
51 file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \ 51 file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \
52 file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \ 52 file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
53 file://0001-statx-fix-compile-errors.patch \ 53 file://0001-statx-fix-compile-errors.patch \
54 file://0001-setrlimit05-Use-another-method-to-get-bad-address.patch \ 54 file://0001-setrlimit05-Use-another-method-to-get-bad-address.patch \
55 file://0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch \
55 " 56 "
56 57
57S = "${WORKDIR}/git" 58S = "${WORKDIR}/git"