Thomas Klausner <w...@netbsd.org> writes:

> Hi!
>
> This version doesn't build for me on NetBSD-7.99.3/amd64 and gcc-4.8.4 with:
>
>   CC       xshmfence_pthread.lo
> xshmfence_pthread.c: In function 'xshmfence_init':
> xshmfence_pthread.c:122:5: error: implicit declaration of function 
> 'pthread_mutexattr_setpshared' [-Werror=implicit-function-declaration]
>      pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED);
>      ^
> xshmfence_pthread.c:122:5: warning: nested extern declaration of 
> 'pthread_mutexattr_setpshared' [-Wnested-externs]
> xshmfence_pthread.c:126:5: error: implicit declaration of function 
> 'pthread_condattr_setpshared' [-Werror=implicit-function-declaration]
>      pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED);
>      ^
> xshmfence_pthread.c:126:5: warning: nested extern declaration of 
> 'pthread_condattr_setpshared' [-Wnested-externs]
>
> "man pthread_condattr_setpshared" comes up empty too. Is there another
> more portable function you could use here?

This code hasn't changed since version 1.1. I believe both of these are
part of the POSIX threads API, as described in the single unix spec
here:

http://www.unix.org/version2/whatsnew/login_threads.html

If the NetBSD mutexes can be shared across processes, and yet doesn't
have these functions, then it's probably reasonable to add tests to the
build process that enable the library even in the absence of them.

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Reply via email to