From da702cfd8f7be1722808ce8cd9eaca87d4e6b63b Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Fri, 5 Aug 2022 10:10:58 -0400 Subject: [PATCH] Compilation issue msys2 (#7403) * Compilation issue msys2 #7399 * Fix flatbuffers compilation issue --- src/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 4620801cc..6a0d12b58 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -209,10 +209,10 @@ void EnsureDirExists(const std::string &filepath) { std::string AbsolutePath(const std::string &filepath) { // clang-format off - #ifdef FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION + #if defined(FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) return filepath; #else - #ifdef _WIN32 + #if defined(_WIN32) || defined(_WIN64) char abs_path[MAX_PATH]; return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr) #else