First pass at native Win32 support (does not compile).
[srvx.git] / src / compat.h
index dbc79315c91e3bed07ddfc0d0a5bc838260861b5..4968587e65159fc23f12d4fc0b95fbc1c7392557 100644 (file)
@@ -61,6 +61,16 @@ char *alloca();
 #include <netdb.h>
 #endif
 
+#ifdef HAVE_WINSOCK2_H
+/* Windows XP+ only -- older versions lack getaddrinfo() etc. */
+# define _WIN32_WINNT 0x0501
+# include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif