[PATCH] Use AC_USE_SYSTEM_EXTENSIONS to get all pthread prototypes.

Simon Josefsson simon at josefsson.org
Thu Mar 8 07:27:18 PST 2012


Hi!  Without the patch below, I get the following build error on Debian
Squeeze.  I believe several pthread functions require something like
this, others have stumbled on this before, see for example:

http://ipozgaj.blogspot.com/2006/08/posix-threads-and-manual-pages-rant.html

Thanks,
Simon

make[2]: Entering directory `/home/jas/src/p11-kit/p11-kit'
  CC     util.lo
  CC     compat.lo
compat.c: In function '_p11_mutex_init':
compat.c:51: warning: implicit declaration of function 'pthread_mutexattr_settype'
compat.c:51: warning: nested extern declaration of 'pthread_mutexattr_settype'
compat.c:51: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
compat.c:51: error: (Each undeclared identifier is reported only once
compat.c:51: error: for each function it appears in.)

---
 configure.ac |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 428807a..c6f6fc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ LT_INIT([dlopen disable-static])
 AC_PROG_CC
 AC_PROG_CPP
 AM_PROG_CC_C_O
+AC_USE_SYSTEM_EXTENSIONS
 
 LINGUAS=""
 AM_GNU_GETTEXT([external], [need-ngettext])
-- 
1.7.2.5



More information about the p11-glue mailing list