[Piglit] [PATCH] util: Include time.h on all platforms.
Vinson Lee
vlee at freedesktop.org
Thu Nov 3 21:36:14 UTC 2016
Fix MinGW build error.
piglit-util.c: In function 'piglit_time_is_monotonic':
piglit-util.c:583:18: error: storage size of 't' isn't known
struct timespec t;
^
Fixes: e0048f4940f7 ("util: Add piglit_delay_ns() api")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98486
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/util/piglit-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index ef955b97dd26..6becfa664490 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
-#include <time.h>
#endif
#include <assert.h>
@@ -42,6 +41,7 @@
#include <string.h>
#include <errno.h>
#include <inttypes.h>
+#include <time.h>
#if defined(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC) && defined(PIGLIT_HAS_POSIX_TIMER_NOTIFY_THREAD)
#include <pthread.h>
--
2.10.1
More information about the Piglit
mailing list