Fix macro name (no 's' in ifr_addr).
[sfrench/samba-autobuild/.git] / source / lib / replace / system / network.h
index e03c991b3ccd3aef1ec88050eb3f22100179937e..796df2d1dabf009db21fc9f4fbbb588b3efea9a5 100644 (file)
 #include <stropts.h>
 #endif
 
+#ifndef HAVE_SOCKLEN_T
+#define HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 #ifdef REPLACE_INET_NTOA
 /* define is in "replace.h" */
 char *rep_inet_ntoa(struct in_addr ip);
@@ -98,6 +103,16 @@ int rep_inet_pton(int af, const char *src, void *dst);
 const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
 
+#ifndef HAVE_CONNECT
+/* define is in "replace.h" */
+int rep_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+#endif
+
+#ifndef HAVE_GETHOSTBYNAME
+/* define is in "replace.h" */
+struct hostent *rep_gethostbyname(const char *name);
+#endif
+
 #ifdef HAVE_IFADDRS_H
 #include <ifaddrs.h>
 #endif
@@ -120,7 +135,7 @@ int rep_getifaddrs(struct ifaddrs **);
 #endif
 
 #ifndef HAVE_FREEIFADDRS
-int rep_freeifaddrs(struct ifaddrs **);
+void rep_freeifaddrs(struct ifaddrs *);
 #endif
 
 /*
@@ -245,11 +260,6 @@ int rep_freeifaddrs(struct ifaddrs **);
 #define HOST_NAME_MAX 256
 #endif
 
-#ifndef HAVE_SOCKLEN_T
-#define HAVE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
 #ifndef HAVE_SA_FAMILY_T
 #define HAVE_SA_FAMILY_T
 typedef unsigned short int sa_family_t;
@@ -295,7 +305,7 @@ struct addrinfo {
 
 /* Needed for some systems that don't define it (Solaris). */
 #ifndef ifr_netmask
-#define ifr_netmask ifr_addrs
+#define ifr_netmask ifr_addr
 #endif
 
 #ifdef SOCKET_WRAPPER