[PATCH] Use AC_USE_SYSTEM_EXTENSIONS to get all pthread prototypes.

Stef Walter stefw at gnome.org
Thu Mar 8 11:16:47 PST 2012


Thanks! Makes sense.

I applied your patch to p11-kit master.

Cheers,

Stef

On 2012-03-08 16:27, Simon Josefsson wrote:
> 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])



More information about the p11-glue mailing list