From 9241177c9fb2d932d641dcc39539e2f22195d96c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Aug 2017 20:35:42 +0200 Subject: [PATCH] thread: Fix conflict with pthread_sigmask module. * lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if it's defined as a macro. * modules/thread (Depends-on): Add pthread_sigmask. --- ChangeLog | 7 +++++++ lib/glthread/thread.h | 4 +++- modules/thread | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 422d0a3723..ce77753c91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-08-16 Bruno Haible + + thread: Fix conflict with pthread_sigmask module. + * lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if + it's defined as a macro. + * modules/thread (Depends-on): Add pthread_sigmask. + 2017-08-16 Paul Eggert rename: port better to NetBSD diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h index 72bdd9b69e..52336c6873 100644 --- a/lib/glthread/thread.h +++ b/lib/glthread/thread.h @@ -128,7 +128,9 @@ extern int glthread_in_use (void); /* Without this, clang complains that pthread_sigmask is never declared. */ # include # endif -# pragma weak pthread_sigmask +# ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak. */ +# pragma weak pthread_sigmask +# endif # pragma weak pthread_join # ifndef pthread_self diff --git a/modules/thread b/modules/thread index 026e4392d9..b4e9d78d61 100644 --- a/modules/thread +++ b/modules/thread @@ -10,6 +10,7 @@ Depends-on: threadlib extern-inline lock +pthread_sigmask [test $gl_threads_api = posix] configure.ac: gl_THREAD -- 2.39.5