SDL: hidapi: fixed upstream build

From 2666e15cf14d5bef5d886f51b354538b4c93c363 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 27 May 2023 08:21:59 -0700
Subject: [PATCH] hidapi: fixed upstream build

---
 src/hidapi/windows/hid.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c
index 992affb71283..68e2e8ad07e7 100644
--- a/src/hidapi/windows/hid.c
+++ b/src/hidapi/windows/hid.c
@@ -1370,8 +1370,15 @@ int HID_API_EXPORT HID_API_CALL hid_get_input_report(hid_device *dev, unsigned c
 
 void HID_API_EXPORT HID_API_CALL hid_close(hid_device *dev)
 {
+#if defined(__GNUC__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
 	typedef BOOL (WINAPI *CancelIoEx_t)(HANDLE hFile, LPOVERLAPPED lpOverlapped);
-	CancelIoEx_t CancelIoExFunc = (CancelIoEx_t)(void *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "CancelIoEx");
+	CancelIoEx_t CancelIoExFunc = (CancelIoEx_t)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "CancelIoEx");
+#if defined(__GNUC__)
+# pragma GCC diagnostic pop
+#endif
 
 	if (!dev)
 		return;