[PATCH:intel-gpu-tools 1/7] Fix #ifdef check for _SC_AVPHYS_PAGES in intel_get_avail_ram_mb()

Alan Coopersmith alan.coopersmith at oracle.com
Tue Dec 23 19:07:08 PST 2014


Check for the sysconf value used here, not the one used in the
previous function.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 lib/intel_os.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/intel_os.c b/lib/intel_os.c
index db7889b..1badd3e 100644
--- a/lib/intel_os.c
+++ b/lib/intel_os.c
@@ -112,7 +112,7 @@ intel_get_avail_ram_mb(void)
 
 	retval = sysinf.freeram;
 	retval *= sysinf.mem_unit;
-#elif defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES) /* Solaris */
+#elif defined(_SC_PAGESIZE) && defined(_SC_AVPHYS_PAGES) /* Solaris */
 	long pagesize, npages;
 
 	pagesize = sysconf(_SC_PAGESIZE);
-- 
1.7.9.2



More information about the xorg-devel mailing list