mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-27 20:14:02 +08:00
Include sys/types.h for sys/socket.h, on FreeBSD and Darwin.
This commit is contained in:
parent
a2a3fc0ac7
commit
1f022b6b96
@ -21,6 +21,12 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
|
||||
AC_REQUIRE([AC_GNU_SOURCE])
|
||||
AC_CHECK_HEADERS_ONCE(sys/socket.h netdb.h sys/types.h netinet/in.h)
|
||||
AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror],,,[
|
||||
/* sys/types.h is not needed according to POSIX, but the
|
||||
sys/socket.h in i386-unknown-freebsd4.10 and
|
||||
powerpc-apple-darwin5.5 required it. */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
@ -29,6 +35,9 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_TYPES([struct addrinfo],,,[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user