From e7ad59bd73078c2f4cdcfddadacb51c43338fe93 Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Wed, 14 May 2025 13:42:33 +0200 Subject: [PATCH] gh-133568: Only set `HAVE_AF_HYPERV` on supported WinAPI partitions (GH-133569) --- .../next/Windows/2025-05-07-11-25-29.gh-issue-133568.oYV0d8.rst | 1 + Modules/socketmodule.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Windows/2025-05-07-11-25-29.gh-issue-133568.oYV0d8.rst diff --git a/Misc/NEWS.d/next/Windows/2025-05-07-11-25-29.gh-issue-133568.oYV0d8.rst b/Misc/NEWS.d/next/Windows/2025-05-07-11-25-29.gh-issue-133568.oYV0d8.rst new file mode 100644 index 00000000000..1e2a5b582cb --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2025-05-07-11-25-29.gh-issue-133568.oYV0d8.rst @@ -0,0 +1 @@ +Fix compile error when using a WinAPI partition that doesn't support the RPC runtime library. diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index 63624d511c3..200b2b8c7d8 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -259,7 +259,7 @@ typedef int SOCKET_T; #endif // AF_HYPERV is only supported on Windows -#if defined(AF_HYPERV) && defined(MS_WINDOWS) +#if defined(AF_HYPERV) && (defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) # define HAVE_AF_HYPERV #endif