mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
$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
|