From 168444761d1770c2ce8786306b3a5dab4634c1c9 Mon Sep 17 00:00:00 2001 From: Yoichi NAKAYAMA Date: Wed, 14 Mar 2012 23:40:32 +0900 Subject: [PATCH] Fix compile error on Windows. Include UpnpStdInt.h for ssize_t. Define sa_family_t in UpnpInet.h. (cherry picked from commit f7a801c3aec5a60d6422e2689b7189e7e94d560b) --- ChangeLog | 7 +++++++ upnp/inc/UpnpInet.h | 7 +++++++ upnp/src/genlib/net/sock.c | 1 + 3 files changed, 15 insertions(+) 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