Some headers might be available on both Windows and UN*X; try using them
on both platforms. Use <windows.h> on Windows, as we're making some
Win32 calls there.
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
#ifdef _WIN32
- #include <winsock2.h>
+ #include <windows.h>
#else
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <netdb.h>
#include <pwd.h>
#include <unistd.h>
#endif