From 1099f63a0f625a8415119967d59f0cf94751fdc8 Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Mon, 11 Dec 2023 17:46:41 +0100 Subject: [PATCH] Fix get_operating_system_name --- scripts/cmake/xtd_commands.cmake | 6 +++--- src/xtd.core.native.macos/include/xtd/native/macos/mutex.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/xtd_commands.cmake b/scripts/cmake/xtd_commands.cmake index 487494a1b68..8e86a4d6019 100644 --- a/scripts/cmake/xtd_commands.cmake +++ b/scripts/cmake/xtd_commands.cmake @@ -60,12 +60,12 @@ endmacro () ## message("The current operating system name is \"${OPERATING_SYSTEM_NAME}\"") ## @endcode macro(get_operating_system_name OPERATING_SYSTEM_NAME) - if (WIN32) + if (MSYS) # MSYS2, MINGW32 and MINGW64 + set(${OPERATING_SYSTEM_NAME} "MSYS") + elseif (WIN32) set(${OPERATING_SYSTEM_NAME} "Windows") elseif (APPLE) set(${OPERATING_SYSTEM_NAME} "macOS") - elseif (MSYS) # MSYS2, MINGW32 and MINGW64 - set(${OPERATING_SYSTEM_NAME} "MSYS") elseif (UNIX) exec_program("uname" OUTPUT_VARIABLE ${OPERATING_SYSTEM_NAME}) else () diff --git a/src/xtd.core.native.macos/include/xtd/native/macos/mutex.h b/src/xtd.core.native.macos/include/xtd/native/macos/mutex.h index fc65c4624f8..8193fa58e88 100644 --- a/src/xtd.core.native.macos/include/xtd/native/macos/mutex.h +++ b/src/xtd.core.native.macos/include/xtd/native/macos/mutex.h @@ -22,6 +22,7 @@ static inline int pthread_mutex_timedlock(pthread_mutex_t* mut, const struct tim } usleep(20000); } else return -1; + usleep(20000); } return 0; }