]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/gsocket.cpp
replaced complicated and not working test for WinCE version with a simple and working...
[wxWidgets.git] / src / unix / gsocket.cpp
index dd874ef75788489fba32872bead87725ef754a03..227bff176460c530c68825c159eff7516839d7de 100644 (file)
@@ -126,6 +126,18 @@ int _System soclose(int);
 #define SOCKOPTLEN_T SOCKLEN_T
 #endif
 
+/*
+ * OSX 10.2 has int args instead of SOCKLENXXX_T
+ */
+#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
+
 /*
  * MSW defines this, Unices don't.
  */
@@ -1644,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 */