diff --git a/src/runtime_src/core/common/detail/windows/utils.h b/src/runtime_src/core/common/detail/windows/utils.h index 1a6eda9816c..a645c30d2e9 100644 --- a/src/runtime_src/core/common/detail/windows/utils.h +++ b/src/runtime_src/core/common/detail/windows/utils.h @@ -52,6 +52,7 @@ sys_dep_get_last_err_msg() inline std::string getenv(const char* name) { +#ifdef _MSC_VER char* value = nullptr; size_t len = 0; @@ -62,6 +63,10 @@ getenv(const char* name) // Use unique_ptr to ensure memory is freed even if string constructor throws std::unique_ptr guard(value, &std::free); return std::string(guard.get()); +#else + const char* value = std::getenv(name); + return value ? std::string(value) : std::string{}; +#endif } inline std::string diff --git a/src/runtime_src/core/include/xrt/detail/windows/types.h b/src/runtime_src/core/include/xrt/detail/windows/types.h index c5852e54ad1..746eff7d6d9 100644 --- a/src/runtime_src/core/include/xrt/detail/windows/types.h +++ b/src/runtime_src/core/include/xrt/detail/windows/types.h @@ -19,7 +19,7 @@ #include -#ifndef __GNU__ +#ifndef __GNUC__ typedef int64_t ssize_t; typedef int pid_t; #endif diff --git a/src/runtime_src/tools/xclbinutil/aie-pdi-transform/src/CMakeLists.txt b/src/runtime_src/tools/xclbinutil/aie-pdi-transform/src/CMakeLists.txt index 1354017cc8d..6cf6f333081 100644 --- a/src/runtime_src/tools/xclbinutil/aie-pdi-transform/src/CMakeLists.txt +++ b/src/runtime_src/tools/xclbinutil/aie-pdi-transform/src/CMakeLists.txt @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2018-2022 Xilinx, Inc. All rights Reserved. # Copyright (C) 2022-2026 Advanced Micro Devices, Inc. All rights Reserved. -if(NOT WIN32) +if(NOT MSVC) add_compile_options(-Wextra -fvisibility=default) else() add_compile_options(/wd4244 /wd4267 /wd4477 /wd4245)