+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>.
# 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
{