GH #341: Compiling poco-1.5.2 for Cygwin

This commit is contained in:
Alex Fabijanic
2014-04-29 23:06:01 -05:00
parent 794ee36b3d
commit ba3a8b08c5
4 changed files with 11 additions and 19 deletions

View File

@@ -46,7 +46,9 @@ using Poco::Net::Socket;
using Poco::Net::DatagramSocket;
using Poco::Net::SocketAddress;
using Poco::Net::IPAddress;
using Poco::Net::NetworkInterface;
#ifdef POCO_NET_HAS_INTERFACE
using Poco::Net::NetworkInterface;
#endif
using Poco::Timespan;
using Poco::Stopwatch;
using Poco::TimeoutException;
@@ -101,11 +103,11 @@ void DatagramSocketTest::testBroadcast()
UDPEchoServer echoServer;
DatagramSocket ss(IPAddress::IPv4);
#if (POCO_OS != POCO_OS_FREE_BSD)
SocketAddress sa("255.255.255.255", echoServer.port());
#else
#if defined(POCO_NET_HAS_INTERFACE) && (POCO_OS == POCO_OS_FREE_BSD)
NetworkInterface ni = NetworkInterface::forName("em0");
SocketAddress sa(ni.broadcastAddress(1), echoServer.port());
#else
SocketAddress sa("255.255.255.255", echoServer.port());
#endif
// not all socket implementations fail if broadcast option is not set
/*