1 |
blueness 12/11/22 20:54:53 |
2 |
|
3 |
Added: varnish-3.0.3-pthread-uclibc.patch |
4 |
Log: |
5 |
Fix build on uclibc, bug #444294 |
6 |
|
7 |
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 www-servers/varnish/files/varnish-3.0.3-pthread-uclibc.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/varnish/files/varnish-3.0.3-pthread-uclibc.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/varnish/files/varnish-3.0.3-pthread-uclibc.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: varnish-3.0.3-pthread-uclibc.patch |
16 |
=================================================================== |
17 |
Refine header check in bin/varnishd/mgt/mgt.h, mgt_main.c for uClibc |
18 |
|
19 |
Because of the difference in how uClibc and glibc stack their header |
20 |
files, stdio.h indirectly brings in PTHREAD_CANCELED from pthread.h |
21 |
on a uClibc system, whereas it does not on a glibc system. This happens |
22 |
in mgt.h and mgt_main.c. This patch refines the check in those files |
23 |
to take this fact into consideration. |
24 |
|
25 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/444294 |
26 |
--- |
27 |
|
28 |
diff --git a/bin/varnishd/mgt.h b/bin/varnishd/mgt.h |
29 |
index 905fbcc..5d3ab09 100644 |
30 |
--- a/bin/varnishd/mgt.h |
31 |
+++ b/bin/varnishd/mgt.h |
32 |
@@ -126,6 +126,6 @@ extern unsigned mgt_vcc_unsafe_path; |
33 |
syslog(pri, fmt, __VA_ARGS__); \ |
34 |
} while (0) |
35 |
|
36 |
-#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT) |
37 |
+#if (defined(PTHREAD_CANCELED) && !defined(__UCLIBC__)) || defined(PTHREAD_MUTEX_DEFAULT) |
38 |
#error "Keep pthreads out of in manager process" |
39 |
#endif |
40 |
diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c |
41 |
index 1b7f1e3..dce42d9 100644 |
42 |
--- a/bin/varnishd/varnishd.c |
43 |
+++ b/bin/varnishd/varnishd.c |
44 |
@@ -656,6 +656,6 @@ main(int argc, char * const *argv) |
45 |
exit(exit_status); |
46 |
} |
47 |
|
48 |
-#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT) |
49 |
+#if (defined(PTHREAD_CANCELED) && !defined(__UCLIBC__)) || defined(PTHREAD_MUTEX_DEFAULT) |
50 |
#error "Keep pthreads out of in manager process" |
51 |
#endif |