|
@@ -1,42 +0,0 @@
|
1
|
|
-From e3e04d254fb6bac49a285775b729e28b0500476c Mon Sep 17 00:00:00 2001
|
2
|
|
-From: Michael Heimpold <mhei@heimpold.de>
|
3
|
|
-Date: Sun, 21 Dec 2014 01:03:49 +0100
|
4
|
|
-Subject: [PATCH] threads: use forward declarations only for glibc (fixes
|
5
|
|
- #704908)
|
6
|
|
-
|
7
|
|
-The declarations of pthread functions, used to generate weak references
|
8
|
|
-to them, fail to suppress macros. Thus, if any pthread function has
|
9
|
|
-been provided as a macro, compiling threads.c will fail.
|
10
|
|
-This breaks on musl libc, which defines pthread_equal as a macro (in
|
11
|
|
-addition to providing the function, as required).
|
12
|
|
-
|
13
|
|
-Prevent the declarations for e.g. musl libc by refining the condition.
|
14
|
|
-
|
15
|
|
-The idea for this solution was borrowed from the alpine linux guys, see
|
16
|
|
-http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch
|
17
|
|
-
|
18
|
|
-Signed-off-by: Michael Heimpold <mhei@heimpold.de>
|
19
|
|
----
|
20
|
|
- threads.c | 4 ++--
|
21
|
|
- 1 file changed, 2 insertions(+), 2 deletions(-)
|
22
|
|
-
|
23
|
|
---- a/threads.c
|
24
|
|
-+++ b/threads.c
|
25
|
|
-@@ -47,7 +47,7 @@
|
26
|
|
- #ifdef HAVE_PTHREAD_H
|
27
|
|
-
|
28
|
|
- static int libxml_is_threaded = -1;
|
29
|
|
--#ifdef __GNUC__
|
30
|
|
-+#if defined(__GNUC__) && defined(__GLIBC__)
|
31
|
|
- #ifdef linux
|
32
|
|
- #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
|
33
|
|
- extern int pthread_once (pthread_once_t *__once_control,
|
34
|
|
-@@ -89,7 +89,7 @@ extern int pthread_cond_signal ()
|
35
|
|
- __attribute((weak));
|
36
|
|
- #endif
|
37
|
|
- #endif /* linux */
|
38
|
|
--#endif /* __GNUC__ */
|
39
|
|
-+#endif /* defined(__GNUC__) && defined(__GLIBC__) */
|
40
|
|
- #endif /* HAVE_PTHREAD_H */
|
41
|
|
-
|
42
|
|
- /*
|