Add macOS support #34
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2025-08-01 14:39:34 +02:00
parent 81c6875382
commit 039ff6ba42
4 changed files with 7 additions and 9 deletions

View File

@@ -67,7 +67,7 @@ list(APPEND PROJECT_CXXFLAGS_LIST
-std=gnu++${CMAKE_CXX_STANDARD} -std=gnu++${CMAKE_CXX_STANDARD}
) )
if(PROJECT_STATIC_LINK) if(NOT PROJECT_IS_DARWIN AND PROJECT_STATIC_LINK)
list(APPEND PROJECT_CMAKE_EXE_LINKER_FLAGS list(APPEND PROJECT_CMAKE_EXE_LINKER_FLAGS
-static-libgcc -static-libgcc
-static-libstdc++ -static-libstdc++

View File

@@ -59,7 +59,7 @@ if(PROJECT_BUILD)
winspool winspool
ws2_32 ws2_32
) )
else() elseif(NOT PROJECT_IS_DARWIN)
link_libraries( link_libraries(
uring uring
) )

View File

@@ -427,15 +427,11 @@ std::string fuse_test<provider_t>::mount_location;
template <typename provider_t> template <typename provider_t>
std::string fuse_test<provider_t>::mount_location2; std::string fuse_test<provider_t>::mount_location2;
#if defined(__linux__)
using fuse_provider_types = using fuse_provider_types =
::testing::Types<local_s3, remote_s3, local_sia, remote_sia>; ::testing::Types<local_s3, remote_s3, local_sia, remote_sia>;
// using fuse_provider_types = // using fuse_provider_types =
// ::testing::Types<local_s3, remote_s3, local_sia, remote_sia, // ::testing::Types<local_s3, remote_s3, local_sia, remote_sia,
// remote_linux_to_winfsp>; // remote_linux_to_winfsp>;
#else // !defined(__linux__)
build fails here
#endif // defined(_WIN32)
} // namespace repertory } // namespace repertory
#endif // !defined(_WIN32) #endif // !defined(_WIN32)

View File

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