diff --git a/src/util.cpp b/src/util.cpp index 16533b3..da2a03e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -15,6 +15,8 @@ #include "consts.hpp" #include "product.hpp" +#include + /** * \brief A macro that stores the the size of each line of output as a constant 16 bytes */ @@ -67,7 +69,10 @@ int SF::utils::random(int min, int max) { #if SF_PLATFORM == SF_PLATFORM_PARTICLE return ::random(min, max); -#elif SF_PLATFORM == SF_PLATFORM_GCC -#error +#elif SF_PLATFORM == SF_PLATFORM_GLIBC + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution<> distrib(min, max + 1); + return distrib(gen); #endif } \ No newline at end of file