$NetBSD: patch-aa,v 1.7 2007/06/08 08:07:05 wiz Exp $

--- transport.hxx.orig	2006-09-23 11:29:07.000000000 +0000
+++ transport.hxx
@@ -6,7 +6,7 @@
 // For further details see http://fy.chalmers.se/~appro/linux/DVD+RW/
 //
 
-#if defined(__unix) || defined(__unix__)
+#if defined(__unix) || defined(__unix__) || defined(__NetBSD__)
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -16,6 +16,9 @@
 #include <fcntl.h>
 #include <poll.h>
 #include <sys/time.h>
+#if __NetBSD_Version__ >= 299000900
+#include <sys/statvfs.h>
+#endif
 
 inline long getmsecs()
 { struct timeval tv;
@@ -446,7 +449,11 @@ public:
     // mounted, so that it could as well just return 0;
     int umount(int f=-1)
     { struct stat    fsb,msb;
+#if __NetBSD_Version__ >= 299000900
+      struct statvfs *mntbuf;
+#else
       struct statfs *mntbuf;
+#endif
       int            ret=0,mntsize,i;
 
 	if (f==-1) f=fd;
@@ -475,7 +482,7 @@ public:
     {	return 1;   }
 };
 
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
 
 #include <sys/ioctl.h>
 #include <camlib.h>
@@ -642,7 +649,11 @@ public:
     }
     int umount(int f=-1)
     { struct stat    fsb,msb;
+#if __NetBSD_Version__ >= 299000900
+      struct statvfs *mntbuf;
+#else
       struct statfs *mntbuf;
+#endif
       int            ret=0,mntsize,i;
 
 	if (f==-1) f=fd;
