- avoid using of libuuid in Linux builds - no need

This commit is contained in:
Dmytro Bogovych 2025-09-08 11:55:38 +03:00
parent 190d4fde54
commit dd242dfa48
1 changed files with 4 additions and 4 deletions

View File

@ -17,9 +17,9 @@ Uuid::Uuid()
Uuid Uuid::generateOne()
{
Uuid result;
#if defined(TARGET_LINUX)
auto id = uuids::uuid_system_generator{}();
#else
// #if defined(TARGET_LINUX)
// auto id = uuids::uuid_system_generator{}();
// #else
std::random_device rd;
auto seed_data = std::array<int, std::mt19937::state_size> {};
std::generate(std::begin(seed_data), std::end(seed_data), std::ref(rd));
@ -28,7 +28,7 @@ Uuid Uuid::generateOne()
uuids::uuid_random_generator gen{generator};
auto id = gen();
#endif
// #endif
memcpy(result.mUuid, id.as_bytes().data(), id.as_bytes().size_bytes());
return result;
}