X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/384b4373c7ce592248284787a97fa2909821e906..8a60ae88fb4266f22558dd113480c3762a15cac3:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index e217cc6914..414efb7b8e 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -31,6 +31,9 @@ #include #include +// Not enough OS behaviour defined for wxStubs +#ifndef __WXSTUBS__ + #include #include #include @@ -114,7 +117,7 @@ #endif #ifdef __WXMOTIF__ -#define wxAPP_CONTEXT wxTheApp->appContext +#define wxAPP_CONTEXT ((XtAppContext)wxTheApp->GetAppContext()) #endif #ifdef __WINDOWS__ @@ -458,11 +461,7 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const if (m_fd < 0) return FALSE; -#ifdef __WINDOWS__ if (getpeername(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0) -#else - if (getpeername(m_fd, (struct sockaddr *)&my_addr, (unsigned int *)&len_addr) < 0) -#endif return FALSE; addr_man.Disassemble(&my_addr, len_addr); @@ -477,11 +476,7 @@ bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const if (m_fd < 0) return FALSE; -#ifdef __WINDOWS__ if (getsockname(m_fd, (struct sockaddr *)&my_addr, (int *)&len_addr) < 0) -#else - if (getsockname(m_fd, (struct sockaddr *)&my_addr, (unsigned int *)&len_addr) < 0) -#endif return FALSE; addr_man.Disassemble(&my_addr, len_addr); @@ -1545,3 +1540,6 @@ HWND wxSocketHandler::GetHWND() const } #endif + +#endif + // __WXSTUBS__