https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124512

--- Comment #17 from Patrick Welche <prlw1 at cam dot ac.uk> ---
I just had successful build of 8e3c5ce5e802225a7416 with Christopher's
"Updated patch" on NetBSD-current/amd64.

At the risk of flogging a dead horse, as other have now discovered,
it was 100% accurate to state that NetBSD doesn't support
process-shared pthreads as quoted in the manpage, and as demonstrate
by the lack of a pthread_mutexattr_setpshared symbol in libpthread.

If you define the undocumented _PTHREAD_PSHARED before including
<pthread.h> you will indeed "unhide" a function declaration for
pthread_mutexattr_setpshared(), but of course it won't magically
exist in the library.

If you do define _PTHREAD_PSHARED, and rebuild libpthread (not mentioned
in the comment above), then you will obtain a pthread_mutexattr_setpshared
function which in the case of PTHREAD_PROCESS_SHARED simply returns
ENOSYS.

Howver - Christopher's patch works for me!

Reply via email to