From dbab39c6caacb974062ac574b365254412aea412 Mon Sep 17 00:00:00 2001 From: Benjamin Close Date: Tue, 24 Feb 2009 20:51:10 -0800 Subject: gallium: Add support for BSD operating systems, tested with FreeBSD BSD supports pipe in the same way as linux hence options which are safe for linux are also safe for BSD. Define PIPE_OS_BSD in include/pipe/p_config.h and adjust the defines to make use of it. Also define MAP_ANONYMOUS for BSD systems which use MAP_ANON Signed-off-by: Benjamin Close --- src/gallium/auxiliary/util/u_time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary/util/u_time.h') diff --git a/src/gallium/auxiliary/util/u_time.h b/src/gallium/auxiliary/util/u_time.h index 35d97d1..4346ce1 100644 --- a/src/gallium/auxiliary/util/u_time.h +++ b/src/gallium/auxiliary/util/u_time.h @@ -38,7 +38,7 @@ #include "pipe/p_config.h" -#if defined(PIPE_OS_LINUX) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) #include /* timeval */ #include /* usleep */ #endif @@ -58,7 +58,7 @@ extern "C" { */ struct util_time { -#if defined(PIPE_OS_LINUX) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) struct timeval tv; #else int64_t counter; @@ -89,7 +89,7 @@ util_time_timeout(const struct util_time *start, const struct util_time *end, const struct util_time *curr); -#if defined(PIPE_OS_LINUX) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) #define util_time_sleep usleep #else void -- cgit v1.1