mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
gwin32.c: Fix g_win32_check_windows_version() on 32-bit
The Windows API function RtlGetVersion() is actually a function that is decorated by WINAPI (i.e. __stdcall), so we need to correct this so that the symbol can be loaded correctly from ntdll.dll, so that we won't crash as a result. Should fix the crash due to stack overflow on 32-bit builds. https://bugzilla.gnome.org/show_bug.cgi?id=756179
This commit is contained in:
parent
7e9c7a1753
commit
a2cd99bc21
@ -567,7 +567,7 @@ g_win32_check_windows_version (const gint major,
|
||||
|
||||
#if WINAPI_FAMILY != MODERN_API_FAMILY
|
||||
/* For non-modern UI Apps, use the LoadLibraryW()/GetProcAddress() thing */
|
||||
typedef NTSTATUS fRtlGetVersion (PRTL_OSVERSIONINFOEXW);
|
||||
typedef NTSTATUS (WINAPI fRtlGetVersion) (PRTL_OSVERSIONINFOEXW);
|
||||
|
||||
fRtlGetVersion *RtlGetVersion;
|
||||
HMODULE hmodule;
|
||||
|
Loading…
x
Reference in New Issue
Block a user