diff options
author | Guido van Rossum <guido@python.org> | 1995-01-10 16:30:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-01-10 16:30:54 (GMT) |
commit | ca9b323c525d2e5975ca0fbedd158a722110ca9a (patch) | |
tree | d5a80b780d0569c68a5c87c79c9d54a9e1fa2667 /Modules/socketmodule.c | |
parent | a6a1e536acb3769a087dc705e6035f913a28a9ab (diff) | |
download | cpython-ca9b323c525d2e5975ca0fbedd158a722110ca9a.zip cpython-ca9b323c525d2e5975ca0fbedd158a722110ca9a.tar.gz cpython-ca9b323c525d2e5975ca0fbedd158a722110ca9a.tar.bz2 |
better test for existence of hstrerror()
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 08a6f4d..9525dba 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -265,7 +265,7 @@ BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret) #endif /* HAVE_GETHOSTBYNAME_R */ if (hp == NULL) { -#ifndef NT +#ifdef HAVE_HSTRERROR /* Let's get real error message to return */ extern int h_errno; PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno)); @@ -1026,7 +1026,7 @@ BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args) sizeof(addr.sin_addr), AF_INET); if (h == NULL) { -#ifndef NT +#ifdef HAVE_HSTRERROR /* Let's get real error message to return */ extern int h_errno; PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno)); |