aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-01-08 16:53:19 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-01-08 16:53:19 -0800
commit2b36598746a2b1c52fc9df4c6cadd527cf12f0ff (patch)
tree0f65e63a41111a148611f5730e40b8bc0aceb8d7
parent4d02d827fb36787f4a35b731b97d08ecddcb2950 (diff)
downloadtftp-hpa-2b36598746a2b1c52fc9df4c6cadd527cf12f0ff.tar.gz
When specifying includes, need to specify ALL includes
It seems that overriding the default includes overrides ALL includes; so we need to specify them all. Sigh.
-rw-r--r--configure.in37
1 files changed, 36 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 4b6ef76..fa95f4f 100644
--- a/configure.in
+++ b/configure.in
@@ -96,7 +96,42 @@ dnl
dnl <sys/socket.h> isn't among the list of standard headers that autoconf checks,
dnl but POSIX requires <sys/socket.h> for socklen_t to be defined.
dnl
-AC_CHECK_TYPES(socklen_t,,,[
+AC_CHECK_TYPES(socklen_t,,,
+[
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif