From: Guido van Rossum Date: Tue, 10 Jan 1995 16:30:54 +0000 (+0000) Subject: better test for existence of hstrerror() X-Git-Tag: v1.2b1~27 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca9b323c525d2e5975ca0fbedd158a722110ca9a;p=thirdparty%2FPython%2Fcpython.git better test for existence of hstrerror() --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 08a6f4d9a358..9525dbaf1eaf 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));