8764a17e1a
defined and otherwise being 0.
35 lines
820 B
Text
35 lines
820 B
Text
$NetBSD: patch-ab,v 1.1 2006/03/25 17:14:40 joerg Exp $
|
|
|
|
--- src/mem.c.orig 2006-03-25 16:59:45.000000000 +0000
|
|
+++ src/mem.c
|
|
@@ -7,10 +7,10 @@
|
|
#include <sys/fcntl.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
-#if !__linux__
|
|
+#if !defined(__linux__)
|
|
#include <sys/user.h>
|
|
#include <kvm.h>
|
|
-#if __FreeBSD__ || __APPLE__
|
|
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
|
|
#define KVM_NO_FILES O_RDONLY
|
|
#endif
|
|
#endif
|
|
@@ -26,7 +26,7 @@ mem_get_value()
|
|
{
|
|
long total=0;
|
|
|
|
-#if __linux__
|
|
+#if defined(__linux__)
|
|
FILE *fd;
|
|
char var[1024];
|
|
long val,memtotal,memfree;
|
|
@@ -56,7 +56,7 @@ mem_get_value()
|
|
total*=1024;
|
|
|
|
#else
|
|
-#if __FreeBSD__ || __APPLE__
|
|
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
|
|
printf("Not yet supported on FreeBSD.\n");
|
|
exit(1);
|
|
#else
|