From 6dcf1c947bd12d0ad412b6d359da2d538e19ee5b Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Sun, 13 Dec 2009 12:01:31 -0800 Subject: [PATCH] Try handle strerror_r more correct --- cf/roken-frag.m4 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cf/roken-frag.m4 b/cf/roken-frag.m4 index ae78e7e91..ab63a0904 100644 --- a/cf/roken-frag.m4 +++ b/cf/roken-frag.m4 @@ -311,7 +311,6 @@ case "$host_os" in AC_BROKEN([daemon]) ;; esac - AC_BROKEN([ \ chown \ copyhostent \ @@ -357,7 +356,6 @@ AC_BROKEN([ \ strcasecmp \ strdup \ strerror \ - strerror_r \ strftime \ strlcat \ strlcpy \ @@ -502,6 +500,19 @@ AC_REQUIRE([rk_BROKEN_REALLOC])dnl dnl AC_KRB_FUNC_GETCWD_BROKEN +dnl strerror_r is great fun, on linux it exists before sus catched up, +dnl so the return type is diffrent, lets check for both + +AC_PROTO_COMPAT([ +#include +#include +], +strerror_r, int strerror_r(int, char *, size_t)) + +AC_CHECK_FUNC([strerror_r], + [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1, + [Define if you have the function strerror_r.])]) + dnl dnl Checks for prototypes and declarations dnl