diff options
author | Jakub KulĂk <Kulikjak@gmail.com> | 2018-12-31 02:16:40 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2018-12-31 02:16:40 (GMT) |
commit | 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1 (patch) | |
tree | 62f29dd25098345fd413aa32d66d6baa6f95a7a8 /Modules/socketmodule.c | |
parent | 30e023256aa1b00d4c783553752fc6f2cc0b9b27 (diff) | |
download | cpython-6f9bc72c79c3262e5d0f2c0e96b016477399cfb1.zip cpython-6f9bc72c79c3262e5d0f2c0e96b016477399cfb1.tar.gz cpython-6f9bc72c79c3262e5d0f2c0e96b016477399cfb1.tar.bz2 |
bpo-35550: Fix incorrect Solaris define guards (GH-11275)
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.
Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris
https://bugs.python.org/issue35550
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 0ae280f..8c3c2fa 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -267,7 +267,7 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82& #endif /* Solaris fails to define this variable at all. */ -#if defined(sun) && !defined(INET_ADDRSTRLEN) +#if (defined(__sun) && defined(__SVR4)) && !defined(INET_ADDRSTRLEN) #define INET_ADDRSTRLEN 16 #endif |