summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.h')
-rw-r--r--Modules/socketmodule.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index 66d9ccf24e..f31ba532a6 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -249,6 +249,11 @@ typedef int SOCKET_T;
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLongLong(fd)
#endif
+// AF_HYPERV is only supported on Windows
+#if defined(AF_HYPERV) && defined(MS_WINDOWS)
+# define HAVE_AF_HYPERV
+#endif
+
/* Socket address */
typedef union sock_addr {
struct sockaddr_in in;
@@ -297,7 +302,7 @@ typedef union sock_addr {
#ifdef HAVE_LINUX_TIPC_H
struct sockaddr_tipc tipc;
#endif
-#ifdef AF_HYPERV
+#ifdef HAVE_AF_HYPERV
SOCKADDR_HV hv;
#endif
} sock_addr_t;