Commits

Anonymous committed 7ea369d

better test for existence of hstrerror()

Comments (0)

Files changed (1)

Modules/socketmodule.c

 #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));
 			  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));