rrdtool/rrdtool-configure-c99.patch

36 lines
1.4 KiB
Diff

commit f3334fcbde0a77aa48938ba38602bff91c09cf85
Author: Ryan Schmidt <git@ryandesign.com>
Date: Sun Mar 20 16:29:10 2022 -0500
acinclude.m4: Include <stdlib.h> when using exit
Fixes:
conftest.c:124:33: error: implicitly declaring library function 'exit'
with type 'void (int) __attribute__((noreturn))'
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index d9d9eb25..0d6fbf5d 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -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;