diff options
author | joerg <joerg@pkgsrc.org> | 2008-11-08 21:35:57 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-11-08 21:35:57 +0000 |
commit | fba094a13cbeb731f594e15d2a76c44067e365c5 (patch) | |
tree | f809c66edc14e4952663ca3fe75c41a7e29bbb89 /pkgtools | |
parent | cffe738bff617e7399ff4edc00048a8a1c9cad89 (diff) | |
download | pkgsrc-fba094a13cbeb731f594e15d2a76c44067e365c5.tar.gz |
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.
Diffstat (limited to 'pkgtools')
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 34 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 27 |
2 files changed, 56 insertions, 5 deletions
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 <sys/types.h> +#endif + #include <sys/socket.h> + 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 <sys/types.h> +#endif + #include <sys/socket.h> + 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 <sys/types.h> +#endif #include <netinet/in.h> + 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 <sys/types.h> +#endif #include <netinet/in.h> + 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 <sys/types.h> +#endif #include <netinet/in.h> + 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 <sys/types.h> +#endif #include <netinet/in.h> + 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 <sys/types.h> +#endif #include <sys/socket.h> + 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 <sys/types.h> +#endif #include <sys/socket.h> + 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 <sys/socket.h>]]) +AC_CHECK_TYPES([socklen_t], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif + +#include <sys/socket.h> +]]) AC_CHECK_TYPES([struct addrinfo], [], [], [[#include <netdb.h>]]) -AC_CHECK_TYPES([struct in6_addr], [], [], [[#include <netinet/in.h>]]) -AC_CHECK_TYPES([struct sockaddr_in6], [], [], [[#include <netinet/in.h>]]) -AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#include <sys/socket.h>]]) +AC_CHECK_TYPES([struct in6_addr], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#include <netinet/in.h> +]]) +AC_CHECK_TYPES([struct sockaddr_in6], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#include <netinet/in.h> +]]) +AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#include <sys/socket.h> +]]) dnl Assume that freeaddrinfo is only missing if getaddrinfo is also missing AC_CHECK_FUNCS([getnameinfo gai_strerror getaddrinfo], [:], [need_getaddrinfo=yes]) |