aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-04-29 03:49:37 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-04-29 03:49:37 +0200
commitca89de66107d7fed50eac1f9beb0f16655c8491d (patch)
treeceabc017e77e297138792eed4c004055e8eb1f65
parent5454988b9b653c6e4e17cd84465c0121846ede7e (diff)
downloadfetchmail-ca89de66107d7fed50eac1f9beb0f16655c8491d.tar.gz
fetchmail-ca89de66107d7fed50eac1f9beb0f16655c8491d.tar.bz2
fetchmail-ca89de66107d7fed50eac1f9beb0f16655c8491d.zip
Fix gethostbyname_r argument count detection, ...
...those that use NULL will now also #include <stdlib.h>.
-rw-r--r--m4-local/gethostbyname_r.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/m4-local/gethostbyname_r.m4 b/m4-local/gethostbyname_r.m4
index 980bd700..84f99c83 100644
--- a/m4-local/gethostbyname_r.m4
+++ b/m4-local/gethostbyname_r.m4
@@ -13,6 +13,7 @@ dnl @author Brian Stafford <brian@stafford.uklinux.net>
dnl
dnl based on version by Caolan McNamara <caolan@skynet.ie>
dnl based on David Arnold's autoconf suggestion in the threads faq
+dnl with fixes and updates by Matthias Andree
dnl
AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R],
[AC_CACHE_CHECK(number of arguments to gethostbyname_r,
@@ -30,6 +31,7 @@ AC_DEFUN([ACX_WHICH_GETHOSTBYNAME_R],
[
dnl acx_cv_which_gethostbyname_r=0
AC_TRY_LINK([
+#include <stdlib.h>
# include <netdb.h>
], [
char *name;
@@ -43,6 +45,7 @@ dnl acx_cv_which_gethostbyname_r=0
[
dnl acx_cv_which_gethostbyname_r=0
AC_TRY_LINK([
+#include <stdlib.h>
# include <netdb.h>
], [
char *name;