Merge from gnulib.

Include sys/types.h before other headers.
This commit is contained in:
Jim Meyering 2005-10-04 15:51:20 +00:00
parent 2928a59fe5
commit 4dffc10f08

View File

@ -20,6 +20,12 @@
# define GETADDRINFO_H
/* Get all getaddrinfo related declarations, if available. */
/* sys/socket.h in i386-unknown-freebsd4.10 and
powerpc-apple-darwin5.5 require sys/types.h, so include it first.
Then we'll also get 'socklen_t' and 'struct sockaddr' which are
used below. */
# include <sys/types.h>
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif
@ -29,12 +35,6 @@
# ifndef HAVE_STRUCT_ADDRINFO
/* Get 'socklen_t', and 'struct sockaddr' via sys/types.h which are
used below. */
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
/* Structure to contain information about address of a service provider. */
struct addrinfo
{