Fixes to improve portability (especially to OS X, Solaris, OpenBSD).
[ircu2.10.12-pk.git] / include / ircd_addrinfo.h
index e6777d568a52e15870e808fe14e5bb0945a30710..d297dcb13ef37d8ab7eb8ab0588009bda603e730 100644 (file)
@@ -1,7 +1,30 @@
+#ifndef INCLUDED_config_h
+#include "config.h"
+#endif
+
+#ifndef INCLUDED_sys_types_h
 #include <sys/types.h>
+#define INCLUDED_sys_types_h
+#endif
+
+#ifndef INCLUDED_sys_socket_h
 #include <sys/socket.h>
+#define INCLUDED_sys_socket_h
+#endif
+
 #include <netdb.h>
+
+#ifndef INCLUDED_netinet_in_h
 #include <netinet/in.h>
+#define INCLUDED_netinet_in_h
+#endif
+
+#ifdef HAVE_STDINT_H
+#ifndef INCLUDED_stdint_h
+#include <stdint.h>
+#define INCLUDED_stdint_h
+#endif
+#endif
 
 int irc_getaddrinfo(const char *hostname, const char *servname,
                     const struct addrinfo *hints, struct addrinfo **res);