From 5e1af765e8e4c56c32c4ed25da4d4e785abe927b Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Fri, 10 Mar 2023 15:24:47 +0100 Subject: [PATCH] use `GetVersionEx` instead of `GetVersionExW` since we pass a structure of type `OSVERSIONINFOEX`, we need to call `GetVersionEx` instead of `GetVersionExW`. --- Modules/socketmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index b7927750e334b7..6a6f8cf7392e1c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -353,7 +353,7 @@ remove_unusable_flags(PyObject *m) } #ifndef MS_WINDOWS_DESKTOP info.dwOSVersionInfoSize = sizeof(info); - if (!GetVersionExW((OSVERSIONINFOW*) &info)) { + if (!GetVersionEx((OSVERSIONINFO*) &info)) { PyErr_SetFromWindowsErr(0); return -1; }