Windows: Older Windows SDKs need <winsock2.h>

Older SDKs need <winsock2.h> to be included before <ws2tcpip.h>
This commit is contained in:
Asanka C. Herath
2010-11-18 20:43:13 -05:00
parent d267f208ae
commit d11917211b
2 changed files with 2 additions and 4 deletions

View File

@@ -42,6 +42,7 @@ RCSID("$Id$");
#include <stdlib.h>
#include <ctype.h>
#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
@@ -165,6 +166,7 @@ int main(int argc, char **argv)
#ifndef WIN32
fprintf(f, "#include <sys/socket.h>\n");
#else
fprintf(f, "#include <winsock2.h>\n");
fprintf(f, "#include <ws2tcpip.h>\n");
#endif
#endif

View File

@@ -249,10 +249,6 @@ struct sockaddr_dl;
#include <time.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif