summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-11-05 09:17:05 -0500
committerZack Weinberg <zackw@panix.com>2020-11-05 09:17:05 -0500
commitc8b3f6987a7bbfe15ce2c2f04f308a6abc263d04 (patch)
tree1933f6a1080eb66833ca9ecb452307edcb10c6f9
parentaa27fc5707c6be8c921548d5a2c408f24a125a09 (diff)
downloadautoconf-c8b3f6987a7bbfe15ce2c2f04f308a6abc263d04.tar.gz
AC_FUNC_STRERROR_R: Include string.h in test program.
I misremembered how AC_LANG_PROGRAM works. We don’t need to invoke AC_INCLUDES_DEFAULT here but we *do* need to explicitly include string.h. Unfortunately we have no good way of testing for this regression with the testsuite as it is today. * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Include string.h in test program.
-rw-r--r--lib/autoconf/functions.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index e474984f..a91eeebc 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -1699,7 +1699,7 @@ AC_CACHE_CHECK([whether strerror_r returns char *],
[ac_cv_func_strerror_r_char_p], [
ac_cv_func_strerror_r_char_p=no
if test $ac_cv_have_decl_strerror_r = yes; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <string.h>],
[[
char buf[100];
char x = *strerror_r (0, buf, sizeof buf);