diff --git a/Net/samples/ifconfig/src/ifconfig.cpp b/Net/samples/ifconfig/src/ifconfig.cpp index 6e88569af..7fd547431 100644 --- a/Net/samples/ifconfig/src/ifconfig.cpp +++ b/Net/samples/ifconfig/src/ifconfig.cpp @@ -4,7 +4,7 @@ // $Id: //poco/1.4/Net/samples/download/src/ifconfig.cpp#1 $ // // This sample demonstrates the (display only) ifconfig-like capabilities -// of the NetworkInterface class. +// of the NetworkInterface class (on platforms where it is supported). // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. @@ -33,12 +33,17 @@ // +#include "Poco/Net/NetworkInterface.h" +#include + + +#ifdef POCO_NET_HAS_INTERFACE + + #include "Poco/Path.h" #include "Poco/Exception.h" #include "Poco/Net/IPAddress.h" -#include "Poco/Net/NetworkInterface.h" #include -#include using Poco::Path; @@ -148,3 +153,16 @@ int main(int argc, char** argv) return 0; } + + +#else // POCO_NET_HAS_INTERFACE + + +int main(int argc, char** argv) +{ + std::cout << "NetworkInterface not supported on this platform." << std::endl; + return 0; +} + + +#endif // POCO_NET_HAS_INTERFACE diff --git a/Net/testsuite/src/SocketsTestSuite.cpp b/Net/testsuite/src/SocketsTestSuite.cpp index 081456985..e27138362 100644 --- a/Net/testsuite/src/SocketsTestSuite.cpp +++ b/Net/testsuite/src/SocketsTestSuite.cpp @@ -46,9 +46,10 @@ CppUnit::Test* SocketsTestSuite::suite() pSuite->addTest(SocketTest::suite()); pSuite->addTest(SocketStreamTest::suite()); pSuite->addTest(DatagramSocketTest::suite()); - pSuite->addTest(MulticastSocketTest::suite()); pSuite->addTest(DialogSocketTest::suite()); pSuite->addTest(RawSocketTest::suite()); - +#ifdef POCO_NET_HAS_INTERFACE + pSuite->addTest(MulticastSocketTest::suite()); +#endif return pSuite; }