libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 53abf68000b42f425b4e2d668f55ea6836febf6a
parent 070cbae02dd3bd0e968a6c300369184074b4b340
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 26 Feb 2014 17:55:13 +0000

Check for sockaddr_in.sin_len using conditional include

Diffstat:
Mconfigure.ac | 26++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -92,16 +92,6 @@ AX_APPEND_COMPILE_FLAGS([[-fno-strict-aliasing]]) AC_C_BIGENDIAN -AC_CHECK_MEMBER([struct sockaddr_in.sin_len], - [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?]) - ], - [], - [ - #include <sys/types.h> - #include <sys/socket.h> - #include <netinet/in.h> - ]) - AC_CHECK_PROG(HAVE_CURL_BINARY,[curl],true,false) AM_CONDITIONAL(HAVE_CURL_BINARY,$HAVE_CURL_BINARY) AC_CHECK_PROG(HAVE_MAKEINFO_BINARY,[makeinfo],true,false) @@ -244,6 +234,22 @@ AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/ AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false)) +AC_CHECK_MEMBER([struct sockaddr_in.sin_len], + [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?]) + ], + [], + [ + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> + #endif + #ifdef HAVE_NETINET_IN_H + #include <netinet/in.h> + #endif + ]) + # Check for pipe/socketpair signaling AC_MSG_CHECKING([[whether to disable pipes signaling]]) AC_ARG_ENABLE([[pipes]],