On 06/11/2017 10:23, Nicolai Hähnle wrote:
diff --git a/src/gallium/auxiliary/os/os_time.h b/src/util/os_time.h
similarity index 89%
rename from src/gallium/auxiliary/os/os_time.h
rename to src/util/os_time.h
index ca0bdd5a0c4..049ab118db2 100644
--- a/src/gallium/auxiliary/os/os_time.h
+++ b/src/util/os_time.h
@@ -28,34 +28,29 @@
  /**
   * @file
   * OS independent time-manipulation functions.
   *
   * @author Jose Fonseca <jfons...@vmware.com>
   */
#ifndef _OS_TIME_H_
  #define _OS_TIME_H_
-
-#include "pipe/p_config.h"
-
-#if defined(PIPE_OS_UNIX)
-#  include <unistd.h> /* usleep */
-#endif
-
-#include "pipe/p_compiler.h"
-
+#include <stdbool.h>
+#include <stdint.h>
#ifdef __cplusplus
  extern "C" {
  #endif

This patch seems to drop the include of unistd.h, which may be needed for usleep() prototype.

(See http://dronecode.duckdns.org:8010/builders/mesa-mesa/builds/5790)

Patch attached.
From a186f46272c9677f9c33764cbd9d8dc9d442b473 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.tur...@dronecode.org.uk>
Date: Fri, 10 Nov 2017 11:41:13 +0000
Subject: [PATCH] util: include unistd.h, which may be required for usleep
 prototype
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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.tur...@dronecode.org.uk>
---
 src/util/os_time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/os_time.c b/src/util/os_time.c
index 8d8291ff173..72dc7e49c0e 100644
--- a/src/util/os_time.c
+++ b/src/util/os_time.c
@@ -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 */
-- 
2.15.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to