<arpa/inet.h> doesn't exist and isn't needed; and inet_addr() returns
a structure containing a long rather than a long.
#ifdef __BEOS__
#include <net/netdb.h>
#else
+#ifndef macintosh
#include <arpa/inet.h>
#endif
+#endif
#include <fcntl.h>
#else
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,