From 15579ef3cb4d263938b3268f0f104c93c233aacb Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 1 Aug 2025 08:04:34 -0500 Subject: [PATCH] Add macOS support #34 --- support/src/utils/unix.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/support/src/utils/unix.cpp b/support/src/utils/unix.cpp index 7d647690..5871db82 100644 --- a/support/src/utils/unix.cpp +++ b/support/src/utils/unix.cpp @@ -25,13 +25,15 @@ #include "utils/collection.hpp" namespace repertory::utils { -auto convert_to_uint64(pthread_t thread) -> std::uint64_t { #if defined(__APPLE__) +auto convert_to_uint64(pthread_t thread) -> std::uint64_t { return reinterpret_cast(thread); -#else // defined(__APPLE__) - return static_cast(thread); -#endif // defined(__APPLE__) } +#else // defined(__APPLE__) +auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t { + return static_cast(thread); +} +#endif // defined(__APPLE__) auto get_last_error_code() -> int { return errno; }