summaryrefslogtreecommitdiff
path: root/sysutils/mesure/patches/patch-ab
blob: b98e567c99b90be58ba07c2c683b864064216f0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$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