summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon TURNEY <[email protected]>2014-08-17 17:21:27 +0100
committerJon TURNEY <[email protected]>2014-08-20 17:18:39 +0100
commitbde2a62af72847f6722180d0203f5b537d1df8ab (patch)
tree02d39da114be44d845eeadc79da3cc525b5ca9b3 /src
parentcd765cf7eef3119a9d0c9fdec0973fceed0c8eed (diff)
Teach os_get_total_physical_memory about Cygwin
Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/os/os_misc.c4
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 3846a9a82cc..ef84c79a6bf 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)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
# 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)
+#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_CYGWIN)
const long phys_pages = sysconf(_SC_PHYS_PAGES);
const long page_size = sysconf(_SC_PAGE_SIZE);