From 1238b69d744e034a1a4593dd65ffcfc2b14167fb Mon Sep 17 00:00:00 2001 From: Justin Rajewski Date: Thu, 26 Oct 2023 10:29:44 -0600 Subject: [PATCH] Fixes for building on windows --- common/kernel/base_arch.h | 1 + common/kernel/command.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/kernel/base_arch.h b/common/kernel/base_arch.h index a27e261d..ff906bfd 100644 --- a/common/kernel/base_arch.h +++ b/common/kernel/base_arch.h @@ -24,6 +24,7 @@ #include #include +#define NOMINMAX #include "arch_api.h" #include "base_clusterinfo.h" #include "idstring.h" diff --git a/common/kernel/command.cc b/common/kernel/command.cc index ac154cc6..565f5fc5 100644 --- a/common/kernel/command.cc +++ b/common/kernel/command.cc @@ -46,6 +46,7 @@ #include "version.h" #if defined(_WIN32) +#define NOMINMAX #include #include #elif defined(__APPLE__) @@ -126,7 +127,7 @@ std::string proc_self_dirname() std::string proc_self_dirname() { int i = 0; -#ifdef __MINGW32__ +#ifdef _WIN32 char longpath[MAX_PATH + 1]; char shortpath[MAX_PATH + 1]; #else