From 8b7a1a1e6fc3b9f72ea2dc3702a9f76aa4051322 Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 8 Nov 2008 21:35:57 +0000 Subject: OpenBSD headers are still not standalone, even though SUS is pretty explicit about it at least for netinet/in.h. Include sys/types.h before checking for content of sys/socket.h and netinet/in.h to fix this. Reported and tested by Georg Schwarz. --- pkgtools/libnbcompat/files/configure | 34 +++++++++++++++++++++++++++++++++ pkgtools/libnbcompat/files/configure.ac | 27 +++++++++++++++++++++----- 2 files changed, 56 insertions(+), 5 deletions(-) (limited to 'pkgtools/libnbcompat') diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index 1fc82bf27ce..39fd358bdb7 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -10506,8 +10506,13 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #include + int main () { @@ -10541,8 +10546,13 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif + #include + int main () { @@ -10716,8 +10726,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { @@ -10751,8 +10765,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { @@ -10821,8 +10839,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { @@ -10856,8 +10878,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { @@ -10926,8 +10952,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { @@ -10961,8 +10991,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include + int main () { diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index bc80eefcba2..fd4abb3fed9 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -1,4 +1,4 @@ -dnl $NetBSD: configure.ac,v 1.69 2008/10/26 12:31:30 joerg Exp $ +dnl $NetBSD: configure.ac,v 1.70 2008/11/08 21:35:58 joerg Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) @@ -256,11 +256,28 @@ AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) need_getaddrinfo=no -AC_CHECK_TYPES([socklen_t], [], [], [[#include ]]) +AC_CHECK_TYPES([socklen_t], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#include +]]) AC_CHECK_TYPES([struct addrinfo], [], [], [[#include ]]) -AC_CHECK_TYPES([struct in6_addr], [], [], [[#include ]]) -AC_CHECK_TYPES([struct sockaddr_in6], [], [], [[#include ]]) -AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#include ]]) +AC_CHECK_TYPES([struct in6_addr], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include +#endif +#include +]]) +AC_CHECK_TYPES([struct sockaddr_in6], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include +#endif +#include +]]) +AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include +#endif +#include +]]) dnl Assume that freeaddrinfo is only missing if getaddrinfo is also missing AC_CHECK_FUNCS([getnameinfo gai_strerror getaddrinfo], [:], [need_getaddrinfo=yes]) -- cgit v1.2.3