Commit 8c159761 authored by Ross Lagerwall's avatar Ross Lagerwall

Issue #10951: Fix warnings in the socket module.

parent 8a56085b
...@@ -4263,7 +4263,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args) ...@@ -4263,7 +4263,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
int buf_len = (sizeof buf) - 1; int buf_len = (sizeof buf) - 1;
int errnop; int errnop;
#endif #endif
#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG) #ifdef HAVE_GETHOSTBYNAME_R_3_ARG
int result; int result;
#endif #endif
#endif /* HAVE_GETHOSTBYNAME_R */ #endif /* HAVE_GETHOSTBYNAME_R */
...@@ -4275,7 +4275,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args) ...@@ -4275,7 +4275,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_GETHOSTBYNAME_R #ifdef HAVE_GETHOSTBYNAME_R
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG) #if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
result = gethostbyname_r(name, &hp_allocated, buf, buf_len, gethostbyname_r(name, &hp_allocated, buf, buf_len,
&h, &errnop); &h, &errnop);
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG) #elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)
h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop); h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop);
...@@ -4337,7 +4337,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args) ...@@ -4337,7 +4337,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
int buf_len = (sizeof buf) - 1; int buf_len = (sizeof buf) - 1;
int errnop; int errnop;
#endif #endif
#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG) #ifdef HAVE_GETHOSTBYNAME_R_3_ARG
int result; int result;
#endif #endif
#endif /* HAVE_GETHOSTBYNAME_R */ #endif /* HAVE_GETHOSTBYNAME_R */
...@@ -4371,7 +4371,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args) ...@@ -4371,7 +4371,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_GETHOSTBYNAME_R #ifdef HAVE_GETHOSTBYNAME_R
#if defined(HAVE_GETHOSTBYNAME_R_6_ARG) #if defined(HAVE_GETHOSTBYNAME_R_6_ARG)
result = gethostbyaddr_r(ap, al, af, gethostbyaddr_r(ap, al, af,
&hp_allocated, buf, buf_len, &hp_allocated, buf, buf_len,
&h, &errnop); &h, &errnop);
#elif defined(HAVE_GETHOSTBYNAME_R_5_ARG) #elif defined(HAVE_GETHOSTBYNAME_R_5_ARG)
......
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