(pthread_join): Only apply the weak pragma if the function actually exists.
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jun 2004 09:53:50 +0000 (09:53 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jun 2004 09:53:50 +0000 (09:53 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83847 138bc75d-0d04-0410-961f-82ee72b054a4

libmudflap/mf-runtime.c

index 8b1cc74..c1f0a6a 100644 (file)
@@ -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