diff options
author | Vinson Lee <vlee@freedesktop.org> | 2014-08-22 10:18:40 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2014-08-22 18:24:34 -0700 |
commit | c2867f5b3626157379ef0d4d5bcaf5180ca0ec1f (patch) | |
tree | 698424d6dae7c748a51d5dd47522c0124f41c5cf /src/gallium/auxiliary/os/os_misc.c | |
parent | 12a679a6f61259d833b0d9098b9f6e2607611cc6 (diff) | |
download | external_mesa3d-c2867f5b3626157379ef0d4d5bcaf5180ca0ec1f.zip external_mesa3d-c2867f5b3626157379ef0d4d5bcaf5180ca0ec1f.tar.gz external_mesa3d-c2867f5b3626157379ef0d4d5bcaf5180ca0ec1f.tar.bz2 |
auxilary/os: Add Solaris support in os_get_total_physical_memory.
The patch fixes the build on Oracle Solaris.
CC os/os_misc.lo
"os/os_misc.c", line 59: #error: unexpected platform in os_sysinfo.c
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'src/gallium/auxiliary/os/os_misc.c')
-rw-r--r-- | src/gallium/auxiliary/os/os_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/os/os_misc.c b/src/gallium/auxiliary/os/os_misc.c index ef84c79..4c5a22d 100644 --- a/src/gallium/auxiliary/os/os_misc.c +++ b/src/gallium/auxiliary/os/os_misc.c @@ -47,7 +47,7 @@ #endif -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) # include <unistd.h> #elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD) # include <sys/sysctl.h> @@ -111,7 +111,7 @@ os_get_option(const char *name) bool os_get_total_physical_memory(uint64_t *size) { -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) const long phys_pages = sysconf(_SC_PHYS_PAGES); const long page_size = sysconf(_SC_PAGE_SIZE); |