diff --git a/src/util/meson.build b/src/util/meson.build index e5283ff7f79..6cb2a5323ad 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -340,6 +340,7 @@ if with_tests 'tests/roundeven_test.cpp', 'tests/set_test.cpp', 'tests/sparse_array_test.cpp', + 'tests/timespec_test.cpp', 'tests/u_atomic_test.cpp', 'tests/u_debug_stack_test.cpp', 'tests/u_printf_test.cpp', @@ -354,12 +355,6 @@ if with_tests ) endif - if cc.has_header('sys/time.h') # MinGW has this, but Vanilla windows doesn't - files_util_tests += files( - 'tests/timespec_test.cpp' - ) - endif - # FIXME: this test crashes on windows if host_machine.system() != 'windows' files_util_tests += files( diff --git a/src/util/timespec.h b/src/util/timespec.h index 83411090ffa..8590f657e3f 100644 --- a/src/util/timespec.h +++ b/src/util/timespec.h @@ -34,9 +34,9 @@ #include #include -#include #include +#include "c11/time.h" #include "macros.h" #define NSEC_PER_SEC 1000000000