diff --git a/include/wx/gsocket.h b/include/wx/gsocket.h index 4a36546b2c..5786aa65f0 100644 --- a/include/wx/gsocket.h +++ b/include/wx/gsocket.h @@ -173,11 +173,10 @@ public: virtual void Close() = 0; virtual void Shutdown(); -#ifdef __WINDOWS__ - SOCKET m_fd; -#else + // this is officially SOCKET (unsigned int) under Windows but we don't want + // to include winsock.h which defines SOCKET from here so just use int + // under all platforms int m_fd; -#endif int m_initialRecvBufferSize; int m_initialSendBufferSize; diff --git a/src/msw/gsockmsw.cpp b/src/msw/gsockmsw.cpp index 61ba71bdfe..3ca8b48349 100644 --- a/src/msw/gsockmsw.cpp +++ b/src/msw/gsockmsw.cpp @@ -367,7 +367,7 @@ LRESULT CALLBACK _GSocket_Internal_WinProc(HWND hWnd, * destroyed) and for safety, check that the m_fd field * is what we expect it to be. */ - if ((socket != NULL) && (socket->m_fd == wParam)) + if ((socket != NULL) && ((WPARAM)socket->m_fd == wParam)) { switch WSAGETSELECTEVENT(lParam) {