summaryrefslogtreecommitdiff
path: root/sysutils/open-vm-tools/patches/patch-az
blob: 3529c5d4c35f2895c79a3fab725c5d02dc6c37d3 (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
36
37
38
$NetBSD: patch-az,v 1.2 2008/08/31 06:36:48 scottr Exp $

--- lib/include/vmblock.h.orig	2008-08-08 02:01:52.000000000 -0500
+++ lib/include/vmblock.h
@@ -25,12 +25,13 @@
 #ifndef _VMBLOCK_H_
 #define _VMBLOCK_H_
 
-#if defined(sun) || defined(__FreeBSD__)
+#if defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__)
 # include <sys/ioccom.h>
 #endif
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 # include <sys/param.h>
+# include <sys/ioctl.h>
 #endif
 
 #define VMBLOCK_FS_NAME                "vmblock"
@@ -54,7 +55,7 @@
 # define VMBLOCK_DEVICE_MODE            O_WRONLY
 # define VMBLOCK_CONTROL(fd, op, path)  write(fd, path, op)
 
-#elif defined(sun) || defined(__FreeBSD__)
+#elif defined(sun) || defined(__FreeBSD__) || defined(__NetBSD__)
 # define VMBLOCK_MOUNT_POINT            "/var/run/" VMBLOCK_FS_NAME
 # define VMBLOCK_DEVICE                 VMBLOCK_MOUNT_POINT
 # define VMBLOCK_DEVICE_MODE            O_RDONLY
@@ -71,7 +72,7 @@
 #  endif
 #  define VMBLOCK_CONTROL(fd, op, path)  ioctl(fd, op, path)
 
-# elif defined(__FreeBSD__)              /* } else if (FreeBSD) { */
+# elif defined(__FreeBSD__) || defined(__NetBSD__)              /* } else if (FreeBSD) { */
    /*
     * Similar to Solaris, construct ioctl(2) commands for block operations.
     * Since the FreeBSD implementation does not change the user's passed-in