diff options
author | Benjamin Close <[email protected]> | 2009-02-24 20:51:10 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-02-25 07:56:43 -0700 |
commit | dbab39c6caacb974062ac574b365254412aea412 (patch) | |
tree | 78503019f2b6c4095fc14160f133551ddc999d74 /src/gallium/auxiliary/util/u_time.h | |
parent | afe139f629251f38afd5b477d5b00f47d17da60f (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_time.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_time.h b/src/gallium/auxiliary/util/u_time.h index 35d97d16c73..4346ce1fa45 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 <time.h> /* timeval */ #include <unistd.h> /* 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 |