From dbd8339a010cae023d800bdb5e6b03cb9d08229f Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 20 Feb 2006 09:42:33 +0000 Subject: [PATCH] Bug #854823: socketmodule now builds on Sun platforms even when INET_ADDRSTRLEN is not defined. --- Misc/NEWS | 3 +++ Modules/socketmodule.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 28895c4a1d4..8429b7be742 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -224,6 +224,9 @@ Core and builtins Extension Modules ----------------- +- Bug #854823: socketmodule now builds on Sun platforms even when + INET_ADDRSTRLEN is not defined. + - Patch #1393157: os.startfile() now has an optional argument to specify a "command verb" to invoke on the file. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index a4455815656..7368eb4ee70 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -215,8 +215,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