* getaddrinfo.h: Move sys/types.h include first, reported by "Mark
authorSimon Josefsson <simon@josefsson.org>
Tue, 4 Oct 2005 09:53:09 +0000 (09:53 +0000)
committerSimon Josefsson <simon@josefsson.org>
Tue, 4 Oct 2005 09:53:09 +0000 (09:53 +0000)
D. Baushke" <mdb@gnu.org>.

lib/ChangeLog
lib/getaddrinfo.h

index 57572253997c66f6d03a1828f4c7c71779656a0c..190c237d7f23fb00f2a8e325b34311ac6f4fcdd1 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-04  Simon Josefsson  <jas@extundo.com>
+
+       * getaddrinfo.h: Move sys/types.h include first, reported by "Mark
+       D. Baushke" <mdb@gnu.org>.
+
 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * getdelim.c: Include getdelim.h first.  Include <limits.h>.
index 8b2d9bcc103ebf49162c774913273d80d4efd623..01d681f18808e7c1849d21a2b2df6362f7258943 100644 (file)
 # define GETADDRINFO_H
 
 /* Get all getaddrinfo related declarations, if available.  */
+# ifdef HAVE_SYS_TYPES_H
+/* 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>
+# endif
 # 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
 {