From: Guido van Rossum Date: Thu, 4 Nov 1999 18:22:29 +0000 (+0000) Subject: Bugfix by Jack Jansen for Macintosh (for the inet_ntoa/aton changes): X-Git-Tag: v1.6a1~768 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b6e463bd54f6e0236b256fe1b47857b778387a9;p=python Bugfix by Jack Jansen for Macintosh (for the inet_ntoa/aton changes): doesn't exist and isn't needed; and inet_addr() returns a structure containing a long rather than a long. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 9dfc5d02fe..4f63434beb 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -165,8 +165,10 @@ int shutdown( int, int ); #ifdef __BEOS__ #include #else +#ifndef macintosh #include #endif +#endif #include #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,