summaryrefslogtreecommitdiff
path: root/TSRM/threads.m4
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-10-29 18:49:38 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-10-29 18:49:38 +0200
commit36527eccbb793ef15f828ffa4261d9a862144f07 (patch)
treea3e78ca8d17495df51e474335d8192d7f3212143 /TSRM/threads.m4
parentc7ec36d4fa4c70fc5bf4061efad74c55376041bb (diff)
downloadphp-git-36527eccbb793ef15f828ffa4261d9a862144f07.tar.gz
Fixed build failure introduced by PR #2158
Note: AC_TRY_LINK interprets the source as part of a main function, ending up with int main() { /* ... */ int main() { /* ... */ } ; return 0; } here - Using AC_LINK_IFELSE with AC_LANG_SOURCE directly instead.
Diffstat (limited to 'TSRM/threads.m4')
-rw-r--r--TSRM/threads.m45
1 files changed, 2 insertions, 3 deletions
diff --git a/TSRM/threads.m4 b/TSRM/threads.m4
index 7ef920231c..57b46f251a 100644
--- a/TSRM/threads.m4
+++ b/TSRM/threads.m4
@@ -66,10 +66,9 @@ dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
-AC_TRY_LINK( [
+AC_LINK_IFELSE([ AC_LANG_SOURCE([
#include <pthread.h>
#include <stddef.h>
- ], [
void *thread_routine(void *data) {
return data;
@@ -81,7 +80,7 @@ int main() {
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
-} ], [
+} ]) ], [
pthreads_checked=yes
], [
pthreads_checked=no