diff --git a/applications/present3D/Cluster.cpp b/applications/present3D/Cluster.cpp index 4c8cd7b4a..d88a36034 100644 --- a/applications/present3D/Cluster.cpp +++ b/applications/present3D/Cluster.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #if !defined (WIN32) || defined(__CYGWIN__) #include @@ -290,14 +291,23 @@ bool Receiver::init( void ) perror( "Socket" ); return false; } + + int result = 0; + #if defined (WIN32) && !defined(__CYGWIN__) // const BOOL on = TRUE; // setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int)); #else int on = 1; - setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); + result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); #endif + if (result) + { + OSG_NOTICE<<"Warning: Reciever::init() setsockopt(..) failed, errno="<