Bug 426205 - Fix implicit declaration of exit() warning running configure r=bsmedberg a=beltzner
authorcaillon@redhat.com
Thu, 03 Apr 2008 19:09:06 -0700
changeset 13878 cf3ee1d2f8de581405c3257c2f7035673df2e28f
parent 13877 390ac5b332b938df1256702dc1a991dd21641b09
child 13879 30b0a1cd89e65572eb1a6990103184ea073b7508
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, beltzner
bugs426205
milestone1.9pre
Bug 426205 - Fix implicit declaration of exit() warning running configure r=bsmedberg a=beltzner
build/autoconf/altoptions.m4
configure.in
--- a/build/autoconf/altoptions.m4
+++ b/build/autoconf/altoptions.m4
@@ -117,17 +117,18 @@ dnl Apparently, some systems cannot prop
 dnl library unless <pthread.h> is included so we need to test
 dnl using it
 dnl
 dnl MOZ_CHECK_PTHREADS(lib, success, failure)
 AC_DEFUN([MOZ_CHECK_PTHREADS],
 [
 AC_MSG_CHECKING([for pthread_create in -l$1])
 echo "
-    #include <pthread.h> 
+    #include <pthread.h>
+    #include <stdlib.h>
     void *foo(void *v) { int a = 1;  } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
         exit(0);
     }" > dummy.c ;
--- a/configure.in
+++ b/configure.in
@@ -7887,16 +7887,17 @@ if test "$COMPILE_ENVIRONMENT"; then
 if test "$MOZ_X11"; then
     dnl ====================================================
     dnl = Check if X headers exist
     dnl ====================================================
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $XCFLAGS"
     AC_TRY_COMPILE([
         #include <stdio.h>
+        #include <stdlib.h>
         #include <X11/Xlib.h>
         #include <X11/Intrinsic.h>
     ],
     [
         Display *dpy = 0;
         if ((dpy = XOpenDisplay(NULL)) == NULL) {
             fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
             exit(1);