diff options
author | Sam James <sam@gentoo.org> | 2022-10-30 17:13:44 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-30 17:42:39 +0000 |
commit | 2d8193bd35e9a8e058061ed6b1b5b4591124269b (patch) | |
tree | ca6ac725c7fe4ee6e4aec0db851883968e6b7ab6 /m4 | |
parent | da89908ef7d82a90fe5dab8904a65869b5a5d996 (diff) | |
download | autoconf-archive-2d8193bd35e9a8e058061ed6b1b5b4591124269b.tar.gz |
AX_FUNC_SNPRINTF: add missing includes for strcmp(), exit()
Clang 16 makes -Wimplicit-function-declaration an error by default.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ax_func_snprintf.m4 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/m4/ax_func_snprintf.m4 b/m4/ax_func_snprintf.m4 index 6fc87d8..b5b78d4 100644 --- a/m4/ax_func_snprintf.m4 +++ b/m4/ax_func_snprintf.m4 @@ -24,7 +24,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 8 AU_ALIAS([AC_FUNC_SNPRINTF], [AX_FUNC_SNPRINTF]) AC_DEFUN([AX_FUNC_SNPRINTF], @@ -32,7 +32,8 @@ AC_DEFUN([AX_FUNC_SNPRINTF], AC_MSG_CHECKING(for working snprintf) AC_CACHE_VAL(ac_cv_have_working_snprintf, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> - +#include <stdlib.h> +#include <string.h> int main(void) { char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; @@ -51,6 +52,8 @@ AC_MSG_CHECKING(for working vsnprintf) AC_CACHE_VAL(ac_cv_have_working_vsnprintf, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> #include <stdarg.h> +#include <stdlib.h> +#include <string.h> int my_vsnprintf (char *buf, const char *tmpl, ...) { |