]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 241938 via svnmerge from
authorSean Bright <sean@malleable.com>
Thu, 21 Jan 2010 15:32:48 +0000 (15:32 +0000)
committerSean Bright <sean@malleable.com>
Thu, 21 Jan 2010 15:32:48 +0000 (15:32 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r241938 | seanbright | 2010-01-21 10:27:42 -0500 (Thu, 21 Jan 2010) | 12 lines

  Merged revisions 241932 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r241932 | seanbright | 2010-01-21 10:25:46 -0500 (Thu, 21 Jan 2010) | 5 lines

    Fix configure check for PTHREAD_ONCE_INIT when manually adding -Wall to CFLAGS.

    (closes issue #16666)
    Reported by: romain_proformatique
  ........
................

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

configure
configure.ac

index 1c7916ddfb5c8c9de5e3d04ee4fce5250b4176fd..347fb521c70c50197259349dee254b0b3f3f2f68 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 235659 .
+# From configure.ac Revision: 236635 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.64 for asterisk 1.6.
 #
@@ -13060,10 +13060,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 e605287343cb298f407a03c7b6c5f53f93d687f4..d785c6df95fced31c29d8ecc3e21d416279011a8 100644 (file)
@@ -503,8 +503,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"