Blame SOURCES/00299-fix-ssl-module-pymax.patch

28b261
From 439956a149f8a3eb44646498c63b2ef3337d5f3d Mon Sep 17 00:00:00 2001
28b261
From: Christian Heimes <christian@python.org>
28b261
Date: Sun, 25 Feb 2018 13:08:05 +0100
28b261
Subject: [PATCH] Fix ssl module, Python 2.7 doesn't have Py_MAX (#5878)
28b261
28b261
Signed-off-by: Christian Heimes <christian@python.org>
28b261
---
28b261
 Modules/_ssl.c | 3 ++-
28b261
 1 file changed, 2 insertions(+), 1 deletion(-)
28b261
28b261
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
28b261
index af66a581e15a..f9ed94dee1e1 100644
28b261
--- a/Modules/_ssl.c
28b261
+++ b/Modules/_ssl.c
28b261
@@ -610,7 +610,8 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
28b261
         }
28b261
 #elif defined(HAVE_INET_PTON)
28b261
 #ifdef ENABLE_IPV6
28b261
-        char packed[Py_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))];
28b261
+	#define PySSL_MAX(x, y) (((x) > (y)) ? (x) : (y))
28b261
+        char packed[PySSL_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))];
28b261
 #else
28b261
         char packed[sizeof(struct in_addr)];
28b261
 #endif /* ENABLE_IPV6 */