diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-10-27 09:28:10 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-10-27 09:28:10 +0800 |
commit | d52625a94a816fffb880b8a85f3bfd4c35d02b99 (patch) | |
tree | e0af738bbcb7d47f2f9613ee1f63c2da4f9504c1 | |
parent | f87fd39cf32cfda40dadaf1c8906cfc5c0518b06 (diff) | |
download | glib-d52625a94a816fffb880b8a85f3bfd4c35d02b99.tar.gz |
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
-rw-r--r-- | glib/gwin32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/gwin32.c b/glib/gwin32.c index ce462bb4a..4c8965149 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -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; |