diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 77129d13ed..358b38e616 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -222,7 +222,14 @@ namespace Platform if (hModule != nullptr) { using RtlGetVersionPtr = NTSTATUS(WINAPI*)(PRTL_OSVERSIONINFOW); +# if defined(__GNUC__) && __GNUC__ >= 8 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wcast-function-type" +# endif auto fn = (RtlGetVersionPtr)GetProcAddress(hModule, "RtlGetVersion"); +# if defined(__GNUC__) && __GNUC__ >= 8 +# pragma GCC diagnostic pop +# endif if (fn != nullptr) { RTL_OSVERSIONINFOW rovi{};