From 1cc1ebdc46a69c99eede34e34031ee548726baca Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 31 Mar 2022 01:49:12 +0800 Subject: [PATCH] util: always enable timespec_test.cpp c11/time.h always contains `struct timespec` now Signed-off-by: Yonggang Luo Reviewed-by: Jason Ekstrand Part-of: --- src/util/meson.build | 7 +------ src/util/timespec.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) 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