From: Christian Heimes Date: Sun, 25 Feb 2018 12:08:05 +0000 (+0100) Subject: Fix ssl module, Python 2.7 doesn't have Py_MAX (#5878) X-Git-Tag: v2.7.15rc1~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=439956a149f8a3eb44646498c63b2ef3337d5f3d;p=python Fix ssl module, Python 2.7 doesn't have Py_MAX (#5878) Signed-off-by: Christian Heimes --- diff --git a/Modules/_ssl.c b/Modules/_ssl.c index af66a581e1..f9ed94dee1 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -610,7 +610,8 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, } #elif defined(HAVE_INET_PTON) #ifdef ENABLE_IPV6 - char packed[Py_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))]; + #define PySSL_MAX(x, y) (((x) > (y)) ? (x) : (y)) + char packed[PySSL_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))]; #else char packed[sizeof(struct in_addr)]; #endif /* ENABLE_IPV6 */