lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit dd538b6e0233794bf5c0171e37ef449ff6198c9f
parent 5213307a7f2488a520c4377fe23f8efe7e1a07ad
Author: Michael Heimpold <mhei@heimpold.de>
Date:   Sun, 21 Dec 2014 15:54:15 +0100

libxml2: fix build error with musl libc (fixes #454)

Thanks to nakarotori for spotting this.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>

Diffstat:
Mlibs/libxml2/Makefile | 2+-
Alibs/libxml2/patches/0001-threads-use-forward-declarations-only-for-glibc-fixe.patch | 42++++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/libs/libxml2/Makefile b/libs/libxml2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libxml2 PKG_VERSION:=2.9.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://gd.tuwien.ac.at/languages/libxml/ \ diff --git a/libs/libxml2/patches/0001-threads-use-forward-declarations-only-for-glibc-fixe.patch b/libs/libxml2/patches/0001-threads-use-forward-declarations-only-for-glibc-fixe.patch @@ -0,0 +1,42 @@ +From e3e04d254fb6bac49a285775b729e28b0500476c Mon Sep 17 00:00:00 2001 +From: Michael Heimpold <mhei@heimpold.de> +Date: Sun, 21 Dec 2014 01:03:49 +0100 +Subject: [PATCH] threads: use forward declarations only for glibc (fixes + #704908) + +The declarations of pthread functions, used to generate weak references +to them, fail to suppress macros. Thus, if any pthread function has +been provided as a macro, compiling threads.c will fail. +This breaks on musl libc, which defines pthread_equal as a macro (in +addition to providing the function, as required). + +Prevent the declarations for e.g. musl libc by refining the condition. + +The idea for this solution was borrowed from the alpine linux guys, see +http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch + +Signed-off-by: Michael Heimpold <mhei@heimpold.de> +--- + threads.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/threads.c ++++ b/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, +@@ -89,7 +89,7 @@ extern int pthread_cond_signal () + __attribute((weak)); + #endif + #endif /* linux */ +-#endif /* __GNUC__ */ ++#endif /* defined(__GNUC__) && defined(__GLIBC__) */ + #endif /* HAVE_PTHREAD_H */ + + /*