From 456aa90eda187d0bb7c6e9bd3b3b70295e65babc Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 18 Feb 2026 17:59:11 -0800 Subject: [PATCH] Fix two more Windows/MinGW compile errors - net_platform.hpp: guard ssize_t typedef with !__MINGW32__ since MinGW-w64 already defines ssize_t as __int64 in corecrt.h - logger.hpp: push/pop ERROR macro around LogLevel enum (same wingdi.h clash as world_packets.hpp) --- include/core/logger.hpp | 7 +++++++ include/network/net_platform.hpp | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/core/logger.hpp b/include/core/logger.hpp index ed2bf93e..fb86e24d 100644 --- a/include/core/logger.hpp +++ b/include/core/logger.hpp @@ -9,6 +9,10 @@ namespace wowee { namespace core { +#ifdef _WIN32 +#pragma push_macro("ERROR") +#undef ERROR +#endif enum class LogLevel { DEBUG, INFO, @@ -16,6 +20,9 @@ enum class LogLevel { ERROR, FATAL }; +#ifdef _WIN32 +#pragma pop_macro("ERROR") +#endif class Logger { public: diff --git a/include/network/net_platform.hpp b/include/network/net_platform.hpp index 849c69a6..29eaf2c8 100644 --- a/include/network/net_platform.hpp +++ b/include/network/net_platform.hpp @@ -11,7 +11,9 @@ #pragma comment(lib, "ws2_32.lib") using socket_t = SOCKET; - using ssize_t = int; // recv/send return int on Windows +#ifndef __MINGW32__ + using ssize_t = int; // recv/send return int on MSVC +#endif inline constexpr socket_t INVALID_SOCK = INVALID_SOCKET;