From 8ec784c2df2cfe9783d6434a46815c8d0c4f29f0 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 10 Nov 2013 13:43:22 -0500 Subject: Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix). --- Modules/socketmodule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 6c4b050..fa61cfd 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -5188,7 +5188,11 @@ socket_inet_ntop(PyObject *self, PyObject *args) int len; struct sockaddr_in6 addr; DWORD addrlen, ret, retlen; - char ip[MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1]; +#ifdef ENABLE_IPV6 + char ip[Py_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1]; +#else + char ip[INET_ADDRSTRLEN + 1]; +#endif /* Guarantee NUL-termination for PyUnicode_FromString() below */ memset((void *) &ip[0], '\0', sizeof(ip)); -- cgit v0.12