1
From c43546d2c9d877df6963a18f93377f93a169d43a Mon Sep 17 00:00:00 2001
2
From: Cyril Brulebois <kibi@debian.org>
3
Date: Sun, 13 Feb 2011 06:58:45 +0000
4
Subject: [PATCH] Fix FTBFS on GNU/Hurd due to missing PIPE_OS_HURD detection.
6
Thanks to Pino Toscano.
8
Signed-off-by: Cyril Brulebois <kibi@debian.org>
10
src/gallium/auxiliary/os/os_thread.h | 12 ++++++------
11
src/gallium/auxiliary/os/os_time.c | 2 +-
12
2 files changed, 7 insertions(+), 7 deletions(-)
14
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
15
index a084310..69b61c3 100644
16
--- a/src/gallium/auxiliary/os/os_thread.h
17
+++ b/src/gallium/auxiliary/os/os_thread.h
19
#include "util/u_debug.h" /* for assert */
22
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN)
23
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
25
#include <pthread.h> /* POSIX threads headers */
26
#include <stdio.h> /* for perror() */
27
@@ -306,7 +306,7 @@ typedef int64_t pipe_condvar;
31
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED)
32
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_HURD)
34
typedef pthread_barrier_t pipe_barrier;
36
@@ -434,7 +434,7 @@ pipe_semaphore_wait(pipe_semaphore *sema)
40
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN)
41
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
43
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
45
@@ -449,7 +449,7 @@ typedef struct {
47
pipe_tsd_init(pipe_tsd *tsd)
49
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN)
50
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
51
if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) {
52
perror("pthread_key_create(): failed to allocate key for thread specific data");
54
@@ -466,7 +466,7 @@ pipe_tsd_get(pipe_tsd *tsd)
55
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
58
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN)
59
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
60
return pthread_getspecific(tsd->key);
61
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
63
@@ -483,7 +483,7 @@ pipe_tsd_set(pipe_tsd *tsd, void *value)
64
if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) {
67
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN)
68
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
69
if (pthread_setspecific(tsd->key, value) != 0) {
70
perror("pthread_set_specific() failed");
72
diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c
73
index 8490721..edf9483 100644
74
--- a/src/gallium/auxiliary/os/os_time.c
75
+++ b/src/gallium/auxiliary/os/os_time.c
78
#if !defined(PIPE_OS_EMBEDDED)
80
-#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN)
81
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_HURD)
82
# include <sys/time.h> /* timeval */
83
#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)