summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 9dfc5d0..4f63434 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -165,8 +165,10 @@ int shutdown( int, int );
#ifdef __BEOS__
#include <net/netdb.h>
#else
+#ifndef macintosh
#include <arpa/inet.h>
#endif
+#endif
#include <fcntl.h>
#else
@@ -1829,8 +1831,11 @@ BUILD_FUNC_DEF_2(PySocket_inet_aton, PyObject *, self, PyObject *, args)
if (!PyArg_Parse(args, "s", &ip_addr)) {
return NULL;
}
-
+#ifdef macintosh
+ packed_addr = (long)inet_addr(ip_addr).s_addr;
+#else
packed_addr = inet_addr(ip_addr);
+#endif
if (packed_addr == INADDR_NONE) { /* invalid address */
PyErr_SetString(PySocket_Error,