r25715: [libreplace] move definition of struct addrinfo so that it can use socklen_t
authorStefan Metzmacher <metze@samba.org>
Wed, 24 Oct 2007 10:57:57 +0000 (12:57 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:43:25 +0000 (05:43 +0100)
metze
(This used to be commit 12cec014c465a55974aedf44e0e782f5fb841088)

source4/lib/replace/system/network.h

index 1ac881e4967dd590c554f70f293320200bb8421e..774776dca3209e3826af4400b2684bdb3ff6e45e 100644 (file)
@@ -169,21 +169,6 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #define NI_MAXSERV     32
 #endif
 
-#ifndef HAVE_STRUCT_ADDRINFO
-
-struct addrinfo
-{
-       int                     ai_flags;
-       int                     ai_family;
-       int                     ai_socktype;
-       int                     ai_protocol;
-       size_t          ai_addrlen;
-       struct sockaddr *ai_addr;
-       char       *ai_canonname;
-       struct addrinfo *ai_next;
-};
-#endif   /* HAVE_STRUCT_ADDRINFO */
-
 /*
  * glibc on linux doesn't seem to have MSG_WAITALL
  * defined. I think the kernel has it though..
@@ -234,6 +219,19 @@ typedef unsigned short int sa_family_t;
 #endif
 #endif
 
+#ifndef HAVE_STRUCT_ADDRINFO
+struct addrinfo {
+       int                     ai_flags;
+       int                     ai_family;
+       int                     ai_socktype;
+       int                     ai_protocol;
+       socklen_t               ai_addrlen;
+       struct sockaddr         *ai_addr;
+       char                    *ai_canonname;
+       struct addrinfo         *ai_next;
+};
+#endif   /* HAVE_STRUCT_ADDRINFO */
+
 #ifdef SOCKET_WRAPPER
 #ifndef SOCKET_WRAPPER_NOT_REPLACE
 #define SOCKET_WRAPPER_REPLACE