Windows: Add missing extern "C" for hidsdi.h on MinGW < 12.0.0

Follow-up to #113013.
This commit is contained in:
Rémi Verschelde
2026-01-15 23:46:12 +01:00
parent 2d53a62898
commit dac17215ad

View File

@@ -55,7 +55,6 @@
#include <avrt.h> #include <avrt.h>
#include <bcrypt.h> #include <bcrypt.h>
#include <direct.h> #include <direct.h>
#include <hidsdi.h>
#include <knownfolders.h> #include <knownfolders.h>
#include <process.h> #include <process.h>
#include <psapi.h> #include <psapi.h>
@@ -65,6 +64,15 @@
#include <wincrypt.h> #include <wincrypt.h>
#include <winternl.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) #if defined(RD_ENABLED)
#include "servers/rendering/rendering_device.h" #include "servers/rendering/rendering_device.h"
#endif #endif