]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
acinclude.m4: Include <stdlib.h> when using exit 1162/head
authorRyan Schmidt <git@ryandesign.com>
Sun, 20 Mar 2022 21:29:10 +0000 (16:29 -0500)
committerGitHub <noreply@github.com>
Sun, 20 Mar 2022 21:29:10 +0000 (16:29 -0500)
Fixes:

conftest.c:124:33: error: implicitly declaring library function 'exit'
with type 'void (int) __attribute__((noreturn))'

m4/acinclude.m4

index d9d9eb253e7d3cb3f09ad795012608a3124ae025..0d6fbf5d789b5b8bca407b888bb13779f4509079 100644 (file)
@@ -582,7 +582,8 @@ AC_DEFUN([GC_TIMEZONE], [
         AC_REQUIRE([AC_STRUCT_TM])
         AC_CACHE_CHECK([tm_gmtoff in struct tm], gq_cv_have_tm_gmtoff,
                 gq_cv_have_tm_gmtoff=no
-                AC_TRY_COMPILE([#include <time.h>
+                AC_TRY_COMPILE([#include <stdlib.h>
+                                #include <time.h>
                                 #include <$ac_cv_struct_tm>
                                 ],
                                [struct tm t;
@@ -595,7 +596,8 @@ AC_DEFUN([GC_TIMEZONE], [
 
         AC_CACHE_CHECK([__tm_gmtoff in struct tm], gq_cv_have___tm_gmtoff,
                 gq_cv_have___tm_gmtoff=no
-                AC_TRY_COMPILE([#include <time.h>
+                AC_TRY_COMPILE([#include <stdlib.h>
+                                #include <time.h>
                                 #include <$ac_cv_struct_tm>
                                 ],
                                [struct tm t;