Add macOS support #34
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@@ -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<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; }
|
||||
|
||||
|
Reference in New Issue
Block a user