Commit 439956a1 authored by Christian Heimes's avatar Christian Heimes Committed by GitHub

Fix ssl module, Python 2.7 doesn't have Py_MAX (#5878)

Signed-off-by: default avatarChristian Heimes <christian@python.org>
parent 4bb9b9ae
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment