diff --git a/upnp/src/inc/unixutil.h b/upnp/src/inc/unixutil.h index da46b58..30e4269 100644 --- a/upnp/src/inc/unixutil.h +++ b/upnp/src/inc/unixutil.h @@ -35,10 +35,13 @@ /* Unix-specific network utilities */ #include "UpnpInet.h" +#include #ifdef WIN32 typedef int socklen_t; - #define EAFNOSUPPORT 97 + #ifndef EAFNOSUPPORT /* VS2010 has this defined */ + #define EAFNOSUPPORT 97 + #endif #else #include #include diff --git a/upnp/src/inc/upnputil.h b/upnp/src/inc/upnputil.h index 7236d6d..76292f8 100644 --- a/upnp/src/inc/upnputil.h +++ b/upnp/src/inc/upnputil.h @@ -38,6 +38,7 @@ */ #include "upnp.h" +#include /* usually used to specify direction of parameters in functions */ #ifndef IN @@ -122,7 +123,9 @@ void linecopylen( #ifndef S_ISDIR #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif - #define EADDRINUSE WSAEADDRINUSE + #ifndef EADDRINUSE /* VS2010 has this defined */ + #define EADDRINUSE WSAEADDRINUSE + #endif #define strcasecmp stricmp #define strncasecmp strnicmp #define sleep(a) Sleep((a)*1000)