mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
- SF #3552774: Don't hide default target in subordinate makefile
- SF #3534307: Building IPv6 for Linux by default - SF #3516844: poco missing symbols with external >=lipcre-8.13 - fix of rev. 1952 fix (porting rev.1913 from 1.4.4 (fixed SF# 3550553))
This commit is contained in:
@@ -280,6 +280,7 @@ bool NetworkInterfaceImpl::supportsIPv4() const
|
||||
|
||||
bool NetworkInterfaceImpl::supportsIPv6() const
|
||||
{
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
AddressList::const_iterator it = _addressList.begin();
|
||||
AddressList::const_iterator end = _addressList.end();
|
||||
for (; it != end; ++it)
|
||||
@@ -287,7 +288,7 @@ bool NetworkInterfaceImpl::supportsIPv6() const
|
||||
if (IPAddress::IPv6 == it->get<NetworkInterface::IP_ADDRESS>().family())
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1242,11 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (family == AF_INET || family == AF_INET6)
|
||||
if (family == AF_INET
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
|| family == AF_INET6
|
||||
#endif
|
||||
)
|
||||
{
|
||||
intf = NetworkInterface(std::string(currIface->ifa_name), address, subnetMask, broadcastAddress, ifIndex);
|
||||
if ((upOnly && intf.isUp()) || !upOnly)
|
||||
|
@@ -358,11 +358,13 @@ int SocketAddress::af() const
|
||||
std::string SocketAddress::toString() const
|
||||
{
|
||||
std::string result;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
if (host().family() == IPAddress::IPv6)
|
||||
result.append("[");
|
||||
result.append(host().toString());
|
||||
if (host().family() == IPAddress::IPv6)
|
||||
result.append("]");
|
||||
#endif
|
||||
result.append(":");
|
||||
NumberFormatter::append(result, port());
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user