Before declaring h_errno, do not check for Win32 only. Instead, do check
whether h_errno is a macro.
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
index 9bc9917..7d07e53 100644
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -544,7 +544,7 @@
 	struct gai_afd *gai_afd;
 	int i, error = 0, h_error;
 	char *ap;
-#if !defined(INET6) && !defined(MS_WIN32)
+#if !defined(INET6) && !defined(h_errno)
 	/* In winsock.h, h_errno is #defined as a function call. */
 	extern int h_errno;
 #endif