diff --git a/ChangeLog b/ChangeLog index a9755fa..6680ec8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -318,6 +318,13 @@ Version 1.8.0 Version 1.6.16 ******************************************************************************* +2012-03-14 Yoichi NAKAYAMA + + Fix compile error on Windows. + + Include UpnpStdInt.h for ssize_t. + Define sa_family_t in UpnpInet.h. + 2012-03-14 Yoichi NAKAYAMA Avoid ambiguous change of SsdpEvent in unique_service_name. diff --git a/upnp/inc/UpnpInet.h b/upnp/inc/UpnpInet.h index 6269c4a..ad00a7d 100644 --- a/upnp/inc/UpnpInet.h +++ b/upnp/inc/UpnpInet.h @@ -25,6 +25,13 @@ #include #define UpnpCloseSocket closesocket + + #if(_WIN32_WINNT < 0x0600) + typedef short sa_family_t; + #else + typedef ADDRESS_FAMILY sa_family_t; + #endif + #else /* WIN32 */ #include #if defined(__sun) diff --git a/upnp/src/genlib/net/sock.c b/upnp/src/genlib/net/sock.c index 5aab91e..00415d0 100644 --- a/upnp/src/genlib/net/sock.c +++ b/upnp/src/genlib/net/sock.c @@ -46,6 +46,7 @@ #include "unixutil.h" /* for socklen_t, EAFNOSUPPORT */ #include "upnp.h" +#include "UpnpStdInt.h" /* for ssize_t */ #include #include