util: include unistd.h, which may be required for usleep prototype
authorJon Turney <jon.turney@dronecode.org.uk>
Fri, 10 Nov 2017 11:41:13 +0000 (11:41 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 10 Nov 2017 18:20:35 +0000 (18:20 +0000)
This seems to be dropped in 222a2fb9 "util: move os_time.[ch] to src/util"

../../../src/util/os_time.c: In function ‘os_time_sleep’:
../../../src/util/os_time.c:104:4: error: implicit declaration of function ‘usleep’ [-Werror=implicit-function-declaration]

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/os_time.c

index 8d8291ff17316e6611f54595d626db580f08e585..72dc7e49c0e5595839162eb4b0b7d9abf60f9cd9 100644 (file)
@@ -40,6 +40,7 @@
 #include "util/u_atomic.h"
 
 #if defined(PIPE_OS_UNIX)
+#  include <unistd.h> /* usleep */
 #  include <time.h> /* timeval */
 #  include <sys/time.h> /* timeval */
 #  include <sched.h> /* sched_yield */