aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--fetchmail.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 4fb2f4e7..1549aed9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,8 @@ AC_CHECK_FUNCS(tcsetattr stty setsid geteuid seteuid dnl
atexit inet_aton strftime setrlimit socketpair sigprocmask dnl
sigaction strdup setlocale)
+AC_CHECK_DECLS(strerror)
+
# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
# and breaks gethostbyname(2). It's better to use the bind stuff in the C
# library. So don't add -lresolv to the link list unless it's necessary
diff --git a/fetchmail.h b/fetchmail.h
index a687372e..67320374 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -687,11 +687,11 @@ void itimerthread(void*);
#define chdir _chdir2
#endif /* _EMX_ */
-# if HAVE_STRERROR
-# ifndef strerror /* On some systems, strerror is a macro */
+#ifdef HAVE_STRERROR
+# if !defined(strerror) && !defined(HAVE_DECL_STRERROR) /* On some systems, strerror is a macro */
char *strerror (int);
# endif
-# endif /* HAVE_STRERROR */
+#endif /* HAVE_STRERROR */
#define STRING_DISABLED (char *)-1
#define STRING_DUMMY ""