Add macOS support #34
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2025-08-01 08:04:34 -05:00
parent d9dd2a59e7
commit 15579ef3cb

View File

@@ -25,13 +25,15 @@
#include "utils/collection.hpp" #include "utils/collection.hpp"
namespace repertory::utils { namespace repertory::utils {
auto convert_to_uint64(pthread_t thread) -> std::uint64_t {
#if defined(__APPLE__) #if defined(__APPLE__)
auto convert_to_uint64(pthread_t thread) -> std::uint64_t {
return reinterpret_cast<std::uintptr_t>(thread); return reinterpret_cast<std::uintptr_t>(thread);
#else // defined(__APPLE__)
return static_cast<std::uint64_t>(thread);
#endif // defined(__APPLE__)
} }
#else // defined(__APPLE__)
auto convert_to_uint64(const pthread_t &thread) -> std::uint64_t {
return static_cast<std::uint64_t>(thread);
}
#endif // defined(__APPLE__)
auto get_last_error_code() -> int { return errno; } auto get_last_error_code() -> int { return errno; }