hal-win-socket: guard _WIN32_WINNT definition to prevent redefinition

only define _WIN32_WINNT if not already defined. mingw headers may
predefine this macro, causing redefinition warning.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-16 16:54:11 +09:00
parent 34205d6ba3
commit ed4fb26d75
+2
View File
@@ -14,7 +14,9 @@
#include <mruby/presym.h>
#include "socket_hal.h"
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>