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)
This commit is contained in:
Kelsi 2026-02-18 17:59:11 -08:00
parent 254486d428
commit 456aa90eda
2 changed files with 10 additions and 1 deletions

View file

@ -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:

View file

@ -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;