summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-10-04 15:51:20 +0000
committerJim Meyering <jim@meyering.net>2005-10-04 15:51:20 +0000
commit4dffc10f0821a8aa1e789a8831fa998530ad7fdc (patch)
treea5d6827b06835d9441359414e1553d8e2746bb58 /lib
parent2928a59fe594a5c3b22f66f557e41b547ee63b7b (diff)
downloadcoreutils-4dffc10f0821a8aa1e789a8831fa998530ad7fdc.tar.xz
Merge from gnulib.
Include sys/types.h before other headers.
Diffstat (limited to 'lib')
-rw-r--r--lib/getaddrinfo.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/getaddrinfo.h b/lib/getaddrinfo.h
index 8b2d9bcc1..087d3d579 100644
--- a/lib/getaddrinfo.h
+++ b/lib/getaddrinfo.h
@@ -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
{