There was an error while loading. Please reload this page.
1 parent 4c81d60 commit fe36fc9Copy full SHA for fe36fc9
2 files changed
Modules/getaddrinfo.c
@@ -544,7 +544,7 @@ get_addr(hostname, af, res, pai, port0)
544
struct gai_afd *gai_afd;
545
int i, error = 0, h_error;
546
char *ap;
547
-#if !defined(INET6) && !defined(MS_WIN32)
+#if !defined(INET6) && !defined(h_errno)
548
/* In winsock.h, h_errno is #defined as a function call. */
549
extern int h_errno;
550
#endif
Modules/socketmodule.c
@@ -1789,7 +1789,7 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af)
1789
1790
if (h == NULL) {
1791
/* Let's get real error message to return */
1792
-#ifndef MS_WIN32
+#ifndef h_errno
1793
1794
1795
PyH_Err(h_errno);
0 commit comments