/[gentoo-x86]/www-servers/varnish/files/varnish-3.0.3-pthread-uclibc.patch
Gentoo

Contents of /www-servers/varnish/files/varnish-3.0.3-pthread-uclibc.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Nov 22 20:54:53 2012 UTC (21 months, 4 weeks ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Fix build on uclibc, bug #444294

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 Refine header check in bin/varnishd/mgt/mgt.h, mgt_main.c for uClibc
2
3 Because of the difference in how uClibc and glibc stack their header
4 files, stdio.h indirectly brings in PTHREAD_CANCELED from pthread.h
5 on a uClibc system, whereas it does not on a glibc system. This happens
6 in mgt.h and mgt_main.c. This patch refines the check in those files
7 to take this fact into consideration.
8
9 X-Gentoo-Bug-URL: https://bugs.gentoo.org/444294
10 ---
11
12 diff --git a/bin/varnishd/mgt.h b/bin/varnishd/mgt.h
13 index 905fbcc..5d3ab09 100644
14 --- a/bin/varnishd/mgt.h
15 +++ b/bin/varnishd/mgt.h
16 @@ -126,6 +126,6 @@ extern unsigned mgt_vcc_unsafe_path;
17 syslog(pri, fmt, __VA_ARGS__); \
18 } while (0)
19
20 -#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)
21 +#if (defined(PTHREAD_CANCELED) && !defined(__UCLIBC__)) || defined(PTHREAD_MUTEX_DEFAULT)
22 #error "Keep pthreads out of in manager process"
23 #endif
24 diff --git a/bin/varnishd/varnishd.c b/bin/varnishd/varnishd.c
25 index 1b7f1e3..dce42d9 100644
26 --- a/bin/varnishd/varnishd.c
27 +++ b/bin/varnishd/varnishd.c
28 @@ -656,6 +656,6 @@ main(int argc, char * const *argv)
29 exit(exit_status);
30 }
31
32 -#if defined(PTHREAD_CANCELED) || defined(PTHREAD_MUTEX_DEFAULT)
33 +#if (defined(PTHREAD_CANCELED) && !defined(__UCLIBC__)) || defined(PTHREAD_MUTEX_DEFAULT)
34 #error "Keep pthreads out of in manager process"
35 #endif

  ViewVC Help
Powered by ViewVC 1.1.20