util: include sys/time.h for timespec functions
authorJonathan Gray <jsg@jsg.id.au>
Tue, 15 Nov 2022 04:20:57 +0000 (15:20 +1100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 16 Nov 2022 19:09:30 +0000 (19:09 +0000)
When the futex code moved it removed an include which broke the build
on OpenBSD.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 095dfc6caa2 ("util: Move the implementation of futex_wake and futex_wait from futex.h to futex.c")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19735>

src/util/futex.c

index 6c5663e..fb55ad4 100644 (file)
@@ -92,6 +92,7 @@ int futex_wait(uint32_t *addr, int32_t value, const struct timespec *timeout)
 #elif defined(__OpenBSD__)
 
 #include <sys/futex.h>
+#include <sys/time.h>
 
 int futex_wake(uint32_t *addr, int count)
 {