Skip to content

Commit

Permalink
AC_FUNC_STRERROR_R: Include string.h in test program.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zackw committed Nov 5, 2020
1 parent aa27fc5 commit c8b3f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/autoconf/functions.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c8b3f69

Please sign in to comment.