aboutsummaryrefslogtreecommitdiff
path: root/libmudflap/mf-runtime.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@gcc.gnu.org>2004-06-29 09:53:50 +0000
committerNick Clifton <nickc@gcc.gnu.org>2004-06-29 09:53:50 +0000
commit35a1e17e48db31480bc46a9787ad89a053628e08 (patch)
treef15204a30fb1fda532cfde4a650894a328b7fe46 /libmudflap/mf-runtime.c
parent1eaba2f2086b04bb92b153214d970146452b2fb4 (diff)
downloadgcc-35a1e17e48db31480bc46a9787ad89a053628e08.zip
gcc-35a1e17e48db31480bc46a9787ad89a053628e08.tar.gz
gcc-35a1e17e48db31480bc46a9787ad89a053628e08.tar.bz2
(pthread_join): Only apply the weak pragma if the function actually exists.
From-SVN: r83847
Diffstat (limited to 'libmudflap/mf-runtime.c')
-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 8b1cc74..c1f0a6a 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