Merge pull request #115010 from akien-mga/windows-mingw-fix-hidsdi-extern-c

Windows: Add missing `extern "C"` for `hidsdi.h` on MinGW < 12.0.0
This commit is contained in:
Rémi Verschelde
2026-01-16 13:23:34 +01:00

View File

@@ -55,7 +55,6 @@
#include <avrt.h>
#include <bcrypt.h>
#include <direct.h>
#include <hidsdi.h>
#include <knownfolders.h>
#include <process.h>
#include <psapi.h>
@@ -65,6 +64,15 @@
#include <wincrypt.h>
#include <winternl.h>
// Workaround missing `extern "C"` in MinGW-w64 < 12.0.0.
#if defined(__MINGW32__) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 12)
extern "C" {
#include <hidsdi.h>
}
#else
#include <hidsdi.h>
#endif
#if defined(RD_ENABLED)
#include "servers/rendering/rendering_device.h"
#endif