diff options
author | Benjamin Close <Benjamin.Close@clearchain.com> | 2009-02-24 20:51:10 -0800 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-25 07:56:43 -0700 |
commit | dbab39c6caacb974062ac574b365254412aea412 (patch) | |
tree | 78503019f2b6c4095fc14160f133551ddc999d74 /src/gallium/auxiliary/rtasm | |
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 <Benjamin.Close@clearchain.com>
Diffstat (limited to 'src/gallium/auxiliary/rtasm')
-rw-r--r-- | src/gallium/auxiliary/rtasm/rtasm_execmem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c index 5acc5bcb7b..1f0923b683 100644 --- a/src/gallium/auxiliary/rtasm/rtasm_execmem.c +++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c @@ -37,8 +37,12 @@ #include "rtasm_execmem.h" +#if defined(PIPE_OS_BSD) +#define MAP_ANONYMOUS MAP_ANON +#endif -#if defined(PIPE_OS_LINUX) + +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) /* @@ -114,7 +118,7 @@ rtasm_exec_free(void *addr) } -#else /* PIPE_OS_LINUX */ +#else /* PIPE_OS_LINUX || PIPE_OS_BSD */ /* * Just use regular memory. @@ -134,4 +138,4 @@ rtasm_exec_free(void *addr) } -#endif /* PIPE_OS_LINUX */ +#endif /* PIPE_OS_LINUX || PIPE_OS_BSD */ |