GH #146: NetworkInterface (windows): IP_ADAPTER_IPV4_ENABLED

- GH #146: NetworkInterface (windows): IP_ADAPTER_IPV4_ENABLED
- added Windows 8 _WIN32_WINNT macro
- removed __cplusplus version check for C++11 (not reliable)
This commit is contained in:
Aleksandar Fabijanic
2013-04-22 22:31:43 -05:00
parent 8290a59998
commit 111c2cc52a
3 changed files with 9 additions and 5 deletions

View File

@@ -1030,13 +1030,13 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
unsigned ifIndex = 0;
#if defined(POCO_HAVE_IPv6)
#if defined (IP_ADAPTER_IPV6_ENABLED)
#if (_WIN32_WINNT >= 0x600) && defined (IP_ADAPTER_IPV6_ENABLED)
if (pAddress->Flags & IP_ADAPTER_IPV6_ENABLED) ifIndex = pAddress->Ipv6IfIndex;
#else
ifIndex = pAddress->Ipv6IfIndex;
#endif
#endif
#if defined (IP_ADAPTER_IPV4_ENABLED)
#if (_WIN32_WINNT >= 0x600) && defined (IP_ADAPTER_IPV4_ENABLED)
if (pAddress->Flags & IP_ADAPTER_IPV4_ENABLED) ifIndex = pAddress->IfIndex;
#else
ifIndex = pAddress->IfIndex;