]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckaddr.cpp
Forgot one.
[wxWidgets.git] / src / common / sckaddr.cpp
index 94a2fe6aeccf1b8f5c78b35e1c90618873ad1e2f..b61afc01a44aca9141d48f6958b4ccea8e51a892 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#ifndef __MWERKS__
 #include <memory.h>
+#endif
 
 #include "wx/defs.h"
 #include "wx/object.h"
 
+#if defined(__WXMAC__)
+#include "/wx/mac/macsock.h"
+#endif
+
 #if defined(__WINDOWS__)
 #include <winsock.h>
 #endif // __WINDOWS__
@@ -41,6 +47,9 @@
 #include <socket.h>
 #include <in.h>
 #else
+#if defined(__FreeBSD__) || defined (__NetBSD__)
+#include <sys/types.h>
+#endif
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -116,7 +125,11 @@ bool wxIPV4address::Hostname(const wxString& name)
       return FALSE;
     }
   } else {
+#ifdef __WXMAC__
+    long len_addr = inet_addr(name.GetData()).s_addr ;
+#else
     long len_addr = inet_addr(name.GetData());
+#endif
     if (len_addr == -1)
       return FALSE;
     m_addr->sin_addr.s_addr = len_addr;