Mesa (main): util: always enable timespec_test.cpp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 9 18:00:21 UTC 2022
Module: Mesa
Branch: main
Commit: 1cc1ebdc46a69c99eede34e34031ee548726baca
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cc1ebdc46a69c99eede34e34031ee548726baca
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Thu Mar 31 01:49:12 2022 +0800
util: always enable timespec_test.cpp
c11/time.h always contains `struct timespec` now
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
---
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 <stdint.h>
#include <assert.h>
-#include <time.h>
#include <stdbool.h>
+#include "c11/time.h"
#include "macros.h"
#define NSEC_PER_SEC 1000000000
More information about the mesa-commit
mailing list