blob: 89522cce63319d4d6cda751ed7b245150940dd61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-dg,v 1.2 2009/08/31 14:34:07 tnn Exp $
--- osdep.c.orig 2009-07-17 02:56:24.000000000 +0200
+++ osdep.c
@@ -90,7 +90,7 @@ static void *kqemu_vmalloc(size_t size)
void *ptr;
/* no need (?) for a dummy file on OpenBSD/FreeBSD */
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
int map_anon = MAP_ANON;
#else
int map_anon = 0;
@@ -157,7 +157,7 @@ static void *kqemu_vmalloc(size_t size)
}
size = (size + 4095) & ~4095;
ftruncate(phys_ram_fd, phys_ram_size + size);
-#endif /* !(__OpenBSD__ || __FreeBSD__) */
+#endif /* !(__OpenBSD__ || __FreeBSD__ || __DragonFly__ || __NetBSD__) */
ptr = mmap(NULL,
size,
PROT_WRITE | PROT_READ, map_anon | MAP_SHARED,
|