]> code.ossystems Code Review - openembedded-core.git/commitdiff
libxml2: Contain glibc-extentions under __GLIBC__
authorKhem Raj <raj.khem@gmail.com>
Mon, 6 Apr 2015 17:36:51 +0000 (17:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Apr 2015 09:45:27 +0000 (10:45 +0100)
Makes it more portable

Change-Id: I7bbc4cc0ebc26d54248b8433dab94db207615445
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch [new file with mode: 0644]
meta/recipes-core/libxml/libxml2_2.9.2.bb

diff --git a/meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch b/meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch
new file mode 100644 (file)
index 0000000..c653a81
--- /dev/null
@@ -0,0 +1,32 @@
+From 6750cc564a17c812555cca587660240ccffaaed3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 4 Apr 2015 08:50:40 -0700
+Subject: [PATCH] threads: Define pthread* definitions for glibc compliant libs
+
+This code is assuming glibc but not explicitly saying it
+so lets make it so. Fixes following on musl
+
+threads.c:80:27: error: macro "pthread_equal" requires 2 arguments, but
+only 1 given
+|  extern int pthread_equal ()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ threads.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: libxml2-2.9.2/threads.c
+===================================================================
+--- libxml2-2.9.2.orig/threads.c
++++ libxml2-2.9.2/threads.c
+@@ -47,7 +47,7 @@
+ #ifdef HAVE_PTHREAD_H
+ static int libxml_is_threaded = -1;
+-#ifdef __GNUC__
++#if defined(__GNUC__) && defined(__GLIBC__)
+ #ifdef linux
+ #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+ extern int pthread_once (pthread_once_t *__once_control,
index 1affff12aec9e274bcf2a54863d562d6cd515c6e..79a395cea1fa458599b376c8bdc00dfae8df93d7 100644 (file)
@@ -1,7 +1,9 @@
 require libxml2.inc
 
 SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
-            file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch"
+            file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch \
+           file://0001-threads-Define-pthread-definitions-for-glibc-complia.patch \
+          "
 
 SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788"
 SRC_URI[libtar.sha256sum] = "5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc"