diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-03-06 19:36:18 (GMT) |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2012-03-06 19:36:18 (GMT) |
commit | 8c159761decc518eb9e90c3823c03d9d14cbdfd6 (patch) | |
tree | ae92268e8d3c811f4322ee45969745eafdb63d91 /Modules/socketmodule.c | |
parent | 8a56085b5171050fb85f0bd845e4de3cec7a15bb (diff) | |
download | cpython-8c159761decc518eb9e90c3823c03d9d14cbdfd6.zip cpython-8c159761decc518eb9e90c3823c03d9d14cbdfd6.tar.gz cpython-8c159761decc518eb9e90c3823c03d9d14cbdfd6.tar.bz2 |
Issue #10951: Fix warnings in the socket module.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index d0b89c6..df1c9f9 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -4263,7 +4263,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args) int buf_len = (sizeof buf) - 1; int errnop; #endif -#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG) +#ifdef HAVE_GETHOSTBYNAME_R_3_ARG int result; #endif #endif /* HAVE_GETHOSTBYNAME_R */ @@ -4275,7 +4275,7 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS #ifdef HAVE_GETHOSTBYNAME_R #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); #elif defined(HAVE_GETHOSTBYNAME_R_5_ARG) h = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop); @@ -4337,7 +4337,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args) int buf_len = (sizeof buf) - 1; int errnop; #endif -#if defined(HAVE_GETHOSTBYNAME_R_3_ARG) || defined(HAVE_GETHOSTBYNAME_R_6_ARG) +#ifdef HAVE_GETHOSTBYNAME_R_3_ARG int result; #endif #endif /* HAVE_GETHOSTBYNAME_R */ @@ -4371,7 +4371,7 @@ socket_gethostbyaddr(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS #ifdef HAVE_GETHOSTBYNAME_R #if defined(HAVE_GETHOSTBYNAME_R_6_ARG) - result = gethostbyaddr_r(ap, al, af, + gethostbyaddr_r(ap, al, af, &hp_allocated, buf, buf_len, &h, &errnop); #elif defined(HAVE_GETHOSTBYNAME_R_5_ARG) |