diff --git a/src/util/simple_mtx.h b/src/util/simple_mtx.h index ab206cebcd8..4152bb681e0 100644 --- a/src/util/simple_mtx.h +++ b/src/util/simple_mtx.h @@ -50,10 +50,6 @@ * condition variables. */ -typedef struct { - uint32_t val; -} simple_mtx_t; - #ifndef __OPENCL_VERSION__ #include "util/futex.h" @@ -78,6 +74,9 @@ extern "C" { #endif #if UTIL_FUTEX_SUPPORTED +typedef struct { + uint32_t val; +} simple_mtx_t; #define SIMPLE_MTX_INITIALIZER { 0 } @@ -209,6 +208,11 @@ simple_mtx_assert_locked(simple_mtx_t *mtx) #else +/* Dummy implementation to let more headers compile with OpenCL */ +typedef struct { + uint32_t _; +} simple_mtx_t; + #endif #endif /* _SIMPLE_MTX_H */