From: Georg Brandl Date: Mon, 20 Feb 2006 09:42:37 +0000 (+0000) Subject: Bug #854823: socketmodule now builds on Sun platforms even when X-Git-Tag: v2.4.3c1~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fc63f7ba62eeae00347739cd0e09350ab8f697a;p=thirdparty%2FPython%2Fcpython.git Bug #854823: socketmodule now builds on Sun platforms even when INET_ADDRSTRLEN is not defined. --- diff --git a/Misc/NEWS b/Misc/NEWS index ff76eb672afd..3721a727395b 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -45,6 +45,9 @@ Core and builtins Extension Modules ----------------- +- Bug #854823: socketmodule now builds on Sun platforms even when + INET_ADDRSTRLEN is not defined. + - Bug #876637, prevent stack corruption when socket descriptor is larger than FD_SETSIZE. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 0efa9479405d..a5d2bf3c437b 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -210,8 +210,8 @@ shutdown(how) -- shut down traffic in one or both directions\n\ /* Irix 6.5 fails to define this variable at all. This is needed for both GCC and SGI's compiler. I'd say that the SGI headers - are just busted. */ -#if defined(__sgi) && !defined(INET_ADDRSTRLEN) + are just busted. Same thing for Solaris. */ +#if (defined(__sgi) || defined(sun)) && !defined(INET_ADDRSTRLEN) #define INET_ADDRSTRLEN 16 #endif