From: Max Bachmann Date: Mon, 20 Mar 2023 15:47:17 +0000 (+0100) Subject: gh-102255: Use GetVersionEx instead of GetVersionExW to match argument type (GH-102583) X-Git-Tag: v3.12.0a7~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96e05b62e827a6dee6c658fea9b4976dfd8d30e3;p=thirdparty%2FPython%2Fcpython.git gh-102255: Use GetVersionEx instead of GetVersionExW to match argument type (GH-102583) Since we pass a structure of type `OSVERSIONINFOEX`, we need to call `GetVersionEx` instead of `GetVersionExW`. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index b7927750e334..6a6f8cf7392e 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; }