]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/gsocket.cpp
fixed loop deleting the old filters in SetWildcard() after last commit
[wxWidgets.git] / src / unix / gsocket.cpp
index 7864aa59f3e46e6a33a29e717cbca149d82e7920..227bff176460c530c68825c159eff7516839d7de 100644 (file)
@@ -101,6 +101,9 @@ int _System soclose(int);
 #ifdef sgi
 #  include <bstring.h>
 #endif
+#ifdef _AIX
+#  include <strings.h>
+#endif
 #include <signal.h>
 
 #ifndef SOCKLEN_T
@@ -123,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.
  */
@@ -580,7 +595,6 @@ GSocket *GSocket::WaitConnection()
   err = _GAddress_translate_from(connection->m_peer, &from, fromlen);
   if (err != GSOCK_NOERROR)
   {
-    GAddress_destroy(connection->m_peer);
     delete connection;
     m_error = err;
     return NULL;
@@ -1642,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 */