2000-08-30 17:41:08 +00:00
|
|
|
--- src/vgamisc.c.orig Tue Jul 27 19:36:19 1999
|
|
|
|
+++ src/vgamisc.c Wed Aug 30 17:58:13 2000
|
|
|
|
@@ -73,8 +73,8 @@
|
2000-08-25 09:08:01 +00:00
|
|
|
return __svgalib_graph_mem;
|
|
|
|
}
|
|
|
|
|
|
|
|
-#include <syscall.h>
|
|
|
|
-#include <linux/kernel.h>
|
2000-08-30 17:41:08 +00:00
|
|
|
+#include <sys/types.h>
|
|
|
|
+#include <sys/sysctl.h>
|
2000-08-25 09:08:01 +00:00
|
|
|
|
|
|
|
int __svgalib_physmem(void)
|
|
|
|
{
|
2000-08-30 17:41:08 +00:00
|
|
|
@@ -82,10 +82,11 @@
|
2000-08-25 09:08:01 +00:00
|
|
|
printf("__svgalib_physmem: are you sure you wanna do this??\n");
|
|
|
|
return -1;
|
|
|
|
#else
|
2000-08-30 17:41:08 +00:00
|
|
|
- struct sysinfo si;
|
|
|
|
- si.totalram = 0;
|
|
|
|
- syscall(SYS_sysinfo, &si);
|
|
|
|
- return si.totalram;
|
|
|
|
+ int mem;
|
|
|
|
+ int smem;
|
|
|
|
+ smem = sizeof(mem);
|
|
|
|
+ sysctlbyname("hw.physmem", &mem, &smem, NULL, 0);
|
|
|
|
+ return mem;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|