]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
fixing dangling includes
[wxWidgets.git] / src / common / socket.cpp
index 3d5338425be32f65ff34dd18b2c921be401bcc8e..aba83174a42654305ee3cb51f8655c1cc7fa37a4 100644 (file)
@@ -42,6 +42,7 @@
 #include "wx/stopwatch.h"
 #include "wx/thread.h"
 #include "wx/evtloop.h"
+#include "wx/link.h"
 
 #include "wx/private/fd.h"
 #include "wx/private/socket.h"
@@ -769,7 +770,8 @@ void wxSocketBase::Init()
     {
         // this Initialize() will be undone by wxSocketModule::OnExit(), all
         // the other calls to it should be matched by a call to Shutdown()
-        Initialize();
+        if (!Initialize())
+            wxLogError("Cannot initialize wxSocketBase");
     }
 }
 
@@ -1988,4 +1990,11 @@ private:
 
 IMPLEMENT_DYNAMIC_CLASS(wxSocketModule, wxModule)
 
+#if defined(wxUSE_SELECT_DISPATCHER) && wxUSE_SELECT_DISPATCHER
+// NOTE: we need to force linking against socketiohandler.cpp otherwise in
+//       static builds of wxWidgets the ManagerSetter::ManagerSetter ctor
+//       contained there wouldn't be ever called
+wxFORCE_LINK_MODULE( socketiohandler )
+#endif
+
 #endif // wxUSE_SOCKETS