summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 863a407..d33e190 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -2420,7 +2420,7 @@ PySocket_getnameinfo(PyObject *self, PyObject *args)
n = PyArg_ParseTuple(sa, "si|ii", &hostp, &port, &flowinfo, scope_id);
if (n == 0)
goto fail;
-#ifdef HAVE_SPRINTF
+#ifdef HAVE_SNPRINTF
snprintf(pbuf, sizeof(pbuf), "%d", port);
#else
sprintf(pbuf, "%d", port);