25 lines
861 B
Diff
25 lines
861 B
Diff
Upstream changeset 8743:defc4f072bde + additional fix in fakethread().
|
|
|
|
diff -r d1512848e87b -r defc4f072bde m4/pthreads.m4
|
|
--- a/m4/pthreads.m4 Tue Apr 10 17:08:22 2007 +0100
|
|
+++ b/m4/pthreads.m4 Wed Apr 11 17:32:13 2007 +0200
|
|
@@ -36,11 +36,15 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
|
|
[ac_save_CFLAGS="$CFLAGS"
|
|
ac_save_LIBS="$LIBS"
|
|
CFLAGS="$CFLAGS $cc_cv_werror $PTHREAD_CFLAGS"
|
|
+
|
|
LIBS="$LIBS $PTHREAD_LIBS"
|
|
- AC_COMPILE_IFELSE(
|
|
+ AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
- [[#include <pthread.h>]],
|
|
- [[pthread_create(NULL, NULL, NULL, NULL);]]
|
|
+ [[#include <pthread.h>
|
|
+ void *fakethread(void *arg) { return NULL; }
|
|
+ pthread_t fakevariable;
|
|
+ ]],
|
|
+ [[pthread_create(&fakevariable, NULL, &fakethread, NULL);]]
|
|
)],
|
|
[cc_cv_pthreads=yes],
|
|
[cc_cv_pthreads=no])
|