Re: [Mesa-dev] [PATCH v2 01/26] util: move os_time.[ch] to src/util

2017-11-10 Thread Nicolai Hähnle

On 10.11.2017 13:35, Jon Turney wrote:

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 
   */
  #ifndef _OS_TIME_H_
  #define _OS_TIME_H_
-
-#include "pipe/p_config.h"
-
-#if defined(PIPE_OS_UNIX)
-#  include  /* usleep */
-#endif
-
-#include "pipe/p_compiler.h"
-
+#include 
+#include 
  #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.


Thanks! Patch is:

Reviewed-by: Nicolai Hähnle 

Do you need me to push it for you?

--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 01/26] util: move os_time.[ch] to src/util

2017-11-10 Thread Jon Turney

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 
   */
  
  #ifndef _OS_TIME_H_

  #define _OS_TIME_H_
  
-

-#include "pipe/p_config.h"
-
-#if defined(PIPE_OS_UNIX)
-#  include  /* usleep */
-#endif
-
-#include "pipe/p_compiler.h"
-
+#include 
+#include 
  
  #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 
Date: Fri, 10 Nov 2017 11:41:13 +
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 
---
 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  /* usleep */
 #  include  /* timeval */
 #  include  /* timeval */
 #  include  /* sched_yield */
-- 
2.15.0

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