From: Zack Weinberg Date: Thu, 5 Nov 2020 14:17:05 +0000 (-0500) Subject: AC_FUNC_STRERROR_R: Include string.h in test program. X-Git-Tag: v2.69e~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8b3f6987a7bbfe15ce2c2f04f308a6abc263d04;p=thirdparty%2Fautoconf.git 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. --- 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 ], [[ char buf[100]; char x = *strerror_r (0, buf, sizeof buf);