- Win7/VS100 compile fix

- throw NotImplementedException when no IPV6_V6ONLY defined
This commit is contained in:
Aleksandar Fabijanic
2012-09-10 04:10:35 +00:00
parent c19c3f9411
commit 1a139794de
2 changed files with 5 additions and 3 deletions

View File

@@ -82,11 +82,11 @@
#elif defined (WINVER) #elif defined (WINVER)
#define _WIN32_WINNT WINVER #define _WIN32_WINNT WINVER
#else #else
#define _WIN32_WINNT 0x0500 #define _WIN32_WINNT 0x0601
#endif #endif
#endif #endif
#if (_MSC_VER >= 1300) && (_MSC_VER < 1400) // Visual Studio 2003, MSVC++ 7.1 #if (_MSC_VER >= 1300) && (_MSC_VER < 1400) // Visual Studio 2003, MSVC++ 7.1
#define POCO_MSVS_VERSION 2003 #define POCO_MSVS_VERSION 2003
#define POCO_MSVC_VERSION 71 #define POCO_MSVC_VERSION 71

View File

@@ -224,8 +224,10 @@ void SocketImpl::bind6(const SocketAddress& address, bool reuseAddress, bool ipV
{ {
init(address.af()); init(address.af());
} }
#ifdef IPV6_V6ONLY) #ifdef IPV6_V6ONLY
setOption(IPPROTO_IPV6, IPV6_V6ONLY, ipV6Only ? 1 : 0); setOption(IPPROTO_IPV6, IPV6_V6ONLY, ipV6Only ? 1 : 0);
#else
if (ipV6Only) throw Poco::NotImplementedException("IPV6_V6ONLY not defined.");
#endif #endif
if (reuseAddress) if (reuseAddress)
{ {