From 66257a19aca42554f0b67e018d3b132377428f30 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 4 Oct 2005 09:53:09 +0000 Subject: [PATCH] * getaddrinfo.h: Move sys/types.h include first, reported by "Mark D. Baushke" . --- lib/ChangeLog | 5 +++++ lib/getaddrinfo.h | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 5757225399..190c237d7f 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-10-04 Simon Josefsson + + * getaddrinfo.h: Move sys/types.h include first, reported by "Mark + D. Baushke" . + 2005-10-03 Paul Eggert * getdelim.c: Include getdelim.h first. Include . diff --git a/lib/getaddrinfo.h b/lib/getaddrinfo.h index 8b2d9bcc10..01d681f188 100644 --- a/lib/getaddrinfo.h +++ b/lib/getaddrinfo.h @@ -20,6 +20,13 @@ # 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 +# endif # ifdef HAVE_SYS_SOCKET_H # include # endif @@ -29,12 +36,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 -# endif - /* Structure to contain information about address of a service provider. */ struct addrinfo { -- 2.30.2