From: Ryan Norton Date: Thu, 23 Sep 2004 17:17:43 +0000 (+0000) Subject: SOCKLEN_T handling for OSX - it seems to be defined as a size_t, when the parameters... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e6e1f5176e05660ea0ba0ed02e423ad57e55d30e SOCKLEN_T handling for OSX - it seems to be defined as a size_t, when the parameters to the functions where it is handled is really an int (avoids multiple conversion warnings) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 6aaa755cf9..3ea7d35fbd 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -117,6 +117,12 @@ int _System soclose(int); # endif #endif +#else + /* undefine for OSX - its really an int */ +# ifdef __DARWIN__ +# undef SOCKLEN_T +# define SOCKLEN_T int +# endif #endif /* SOCKLEN_T */ /* @@ -1406,7 +1412,7 @@ void GSocket::Detected_Write() m_establishing = false; - getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, &len); + getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, (int*) &len); if (error) {