$NetBSD: patch-ab,v 1.4 2006/09/24 15:40:38 joerg Exp $

--- quota.c.orig	2002-03-30 14:59:12.000000000 +0000
+++ quota.c
@@ -51,6 +51,12 @@
 #if defined(SYS_UCRED_H)
 # include <sys/ucred.h>  /* required by NetBSD,FreeBSD */
 #endif
+#if defined(__DragonFly__)
+#  include <sys/param.h>
+#  if __DragonFly_version >= 160000
+#    define dqblk ufs_dqblk
+#  endif
+#endif
 #endif
 
 static VALUE rb_mQuota;
@@ -159,7 +165,11 @@ rb_quotactl(int cmd, char *dev, VALUE vu
   char *path;
   int is_gid;
   uid_t uid;
+#if defined(HAVE_SYS_STATVFS_H) && !defined(__DragonFly__)
+  struct statvfs *buff;
+#else
   struct statfs *buff;
+#endif
   int i, count, ret;
   
   buff = 0;
@@ -187,12 +197,16 @@ rb_quotactl(int cmd, char *dev, VALUE vu
 static int
 rb_quotactl(int cmd, char *dev, VALUE vuid, caddr_t addr)
 {
-  struct quotctl qctl = {cmd, uid, addr};
+  struct quotctl qctl;
   int fd;
   uid_t uid;
 
   get_uid(vuid, &uid, 0);
 
+  qctl.op = cmd;
+  qctl.uid = uid;
+  qctl.addr = addr;
+
   switch( cmd ){
   case Q_QUOTAON:
   case Q_QUOTAOFF:
