]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Merge from gnulib.
authorJim Meyering <jim@meyering.net>
Tue, 4 Oct 2005 15:51:20 +0000 (15:51 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 4 Oct 2005 15:51:20 +0000 (15:51 +0000)
Include sys/types.h before other headers.

lib/getaddrinfo.h

index 8b2d9bcc103ebf49162c774913273d80d4efd623..087d3d5793b53b47e1ddd8ab33f38a37dd2c7ac6 100644 (file)
 # 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
 
 # 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
 {