[oe-commits] [openembedded-core] 07/09: ltp: Fix build with glibc 2.29

git at git.openembedded.org git at git.openembedded.org
Fri Dec 14 23:47:48 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d39213ce1300328dd8249f3c2f5df4c3cf0d2f21
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Dec 14 14:57:05 2018 -0800

    ltp: Fix build with glibc 2.29
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...name-getcpu-to-avoid-conflict-with-glibc-.patch | 57 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20180926.bb          |  3 +-
 2 files changed, 59 insertions(+), 1 deletion(-)

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 0000000..d0c8477
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
@@ -0,0 +1,57 @@
+From c9edb0eaaca83c18ac7b5ea3330faad8d47d3fd1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Fri, 14 Dec 2018 06:44:02 -0800
+Subject: [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29
+
+glibc has added getcpu() API starting with glibc 2.29 release, this
+makes the static function in conflict and signatures are not same as
+well.
+
+Renaming helps to keep ltp build going
+
+Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2018-December/010321.html]
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ testcases/kernel/syscalls/getcpu/getcpu01.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
+index c927512ca..e850fe844 100644
+--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
++++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
+@@ -82,7 +82,7 @@ int sys_support = 0;
+ 
+ void cleanup(void);
+ void setup(void);
+-static inline int getcpu(unsigned int *, unsigned int *, void *);
++static inline int get_cpu(unsigned int *, unsigned int *, void *);
+ unsigned int set_cpu_affinity(void);
+ unsigned int get_nodeid(unsigned int);
+ unsigned int max_cpuid(size_t, cpu_set_t *);
+@@ -124,7 +124,7 @@ int main(int ac, char **av)
+ #ifdef __i386__
+ 		node_set = get_nodeid(cpu_set);
+ #endif
+-		TEST(getcpu(&cpu_id, &node_id, NULL));
++		TEST(get_cpu(&cpu_id, &node_id, NULL));
+ 		if (TEST_RETURN == 0) {
+ 			if (cpu_id != cpu_set) {
+ 				tst_resm(TFAIL, "getcpu() returned wrong value"
+@@ -157,10 +157,10 @@ int main(int ac, char **av)
+ }
+ 
+ /*
+- * getcpu() - calls the system call
++ * get_cpu() - calls the system call
+  */
+-static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
+-			 void *cache_struct)
++static inline int get_cpu(unsigned *cpu_id, unsigned *node_id,
++			  void *cache_struct)
+ {
+ #if defined(__i386__)
+ 	return syscall(318, cpu_id, node_id, cache_struct);
+-- 
+2.20.0
+
diff --git a/meta/recipes-extended/ltp/ltp_20180926.bb b/meta/recipes-extended/ltp/ltp_20180926.bb
index e471904..6cfcaa5 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 \
            file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \
            file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
            file://0001-statx-fix-compile-errors.patch \
-		   file://0001-setrlimit05-Use-another-method-to-get-bad-address.patch \
+           file://0001-setrlimit05-Use-another-method-to-get-bad-address.patch \
+           file://0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch \
            "
 
 S = "${WORKDIR}/git"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list