summaryrefslogtreecommitdiff
path: root/libmudflap
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-29 09:53:50 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-29 09:53:50 +0000
commit088bfe2972832c0a474c002c1a10d35ecb283466 (patch)
treef15204a30fb1fda532cfde4a650894a328b7fe46 /libmudflap
parent35c15734e84896f65e212c1263ea47c19acd42a0 (diff)
downloadgcc-088bfe2972832c0a474c002c1a10d35ecb283466.tar.gz
(pthread_join): Only apply the weak pragma if the function actually exists.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83847 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r--libmudflap/mf-runtime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmudflap/mf-runtime.c b/libmudflap/mf-runtime.c
index 8b1cc749c9e..c1f0a6a4828 100644
--- a/libmudflap/mf-runtime.c
+++ b/libmudflap/mf-runtime.c
@@ -136,7 +136,11 @@ pthread_mutex_t __mf_biglock =
the libmudflap.la (no threading support) can diagnose whether
the application is linked with -lpthread. See __mf_usage() below. */
#if HAVE_PTHREAD_H
+#ifdef _POSIX_THREADS
#pragma weak pthread_join
+#else
+#define pthread_join NULL
+#endif
const void *threads_active_p = (void *) pthread_join;
#endif