]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix configure check for PTHREAD_ONCE_INIT when manually adding -Wall to CFLAGS.
authorSean Bright <sean@malleable.com>
Thu, 21 Jan 2010 15:25:46 +0000 (15:25 +0000)
committerSean Bright <sean@malleable.com>
Thu, 21 Jan 2010 15:25:46 +0000 (15:25 +0000)
(closes issue #16666)
Reported by: romain_proformatique

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241932 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configure
configure.ac

index 8fe4fe25545352d4a1565e5d0ba02dccecc14be5..6d5a306335a787ad2d2ae09203d3d8ec761b0b36 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 235652 .
+# From configure.ac Revision: 236585 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.64 for asterisk 1.4.
 #
@@ -11491,10 +11491,11 @@ CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <pthread.h>
+     void empty(){}
 int
 main ()
 {
-pthread_once_t once = PTHREAD_ONCE_INIT;
+pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);
   ;
   return 0;
 }
index efeedb56d796f2d67af9104f43849d29a0770b8c..a4f2dc31700d3ce2a5e37a02ea3b3d18b7fb19cc 100644 (file)
@@ -357,8 +357,9 @@ saved_CFLAGS="${CFLAGS}"
 CFLAGS="${CFLAGS} -Werror -Wmissing-braces"
 AC_COMPILE_IFELSE(
   [AC_LANG_PROGRAM(
-    [#include <pthread.h>],
-       [pthread_once_t once = PTHREAD_ONCE_INIT;])
+    [#include <pthread.h>
+     void empty(){}],
+       [pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, empty);])
   ],[
     AC_MSG_RESULT(no)
     ac_cv_pthread_once_needsbraces="no"