X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9160e5eacd78ddb4c1aa613b4c5b9773328d300..7e4fb3b8168f4f2dbf2f8a246d3e094a8ccba194:/src/unix/gsocket.cpp diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index aeed5804a5..227bff1764 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -129,11 +129,13 @@ int _System soclose(int); /* * OSX 10.2 has int args instead of SOCKLENXXX_T */ -#if defined( __WXMAC__ ) && ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 ) -#undef SOCKOPTLEN_T -#undef SOCKLEN_T -#define SOCKOPTLEN_T int -#define SOCKLEN_T int +#if defined( __WXMAC__ ) || defined ( __WXCOCOA__ ) +# if ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 ) +# undef SOCKOPTLEN_T +# undef SOCKLEN_T +# define SOCKOPTLEN_T int +# define SOCKLEN_T int +# endif #endif /* @@ -1654,7 +1656,7 @@ GSocketError GAddress_INET_SetHostName(GAddress *address, const char *hostname) if (inet_aton(hostname, addr) == 0) { #elif defined(HAVE_INET_ADDR) - if ( (addr->s_addr = inet_addr(hostname)) == -1 ) + if ( (addr->s_addr = inet_addr(hostname)) == (in_addr_t)-1 ) { #else /* Use gethostbyname by default */