pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

net/transmission doesn't compile on DragonFly



Hi, everyone!

net/transmission doesn't compile on DragonFly BSD complaining about missing sys/quota.h.

The patch from dports (DragnoFly ports) fixes the problem. Please consider adding it to pksgrc:

root@kl/usr/pkgsrc/net/transmission# cvs diff .
cvs diff: Diffing .
Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/net/transmission/Makefile.common,v
retrieving revision 1.8
diff -r1.8 Makefile.common
44a45
.include "../../devel/zlib/buildlink3.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/transmission/distinfo,v
retrieving revision 1.9
diff -r1.9 distinfo
7a8
SHA1 (patch-libtransmission_platform-quota.c) = b1c77b170df599d9e0a31838b93d6b73662cb3f6
cvs diff: Diffing patches
cvs diff: patches/patch-libtransmission_platform-quota.c is a new entry, no comparison available


root@kl/usr/pkgsrc/net/transmission# cat patches/patch-libtransmission_platform-quota.c
$NetBSD$

--- libtransmission/platform-quota.c.orig 2015-03-27 12:44:20.469243000 +0000
+++ libtransmission/platform-quota.c
@@ -18,6 +18,8 @@
  #include <sys/types.h> /* types needed by quota.h */
  #if defined(__FreeBSD__) || defined(__OpenBSD__)
   #include <ufs/ufs/quota.h> /* quotactl() */
+ #elif defined (__DragonFly__)
+  #include <vfs/ufs/quota.h> /* quotactl *
  #elif defined (__NetBSD__)
   #include <sys/param.h>
   #ifndef statfs
@@ -244,12 +246,17 @@ getquota (const char * device)
 static int64_t
 getquota (const char * device)
 {
+#ifdef __DragonFly__
+  struct ufs_dqblk dq;
+#else
   struct dqblk dq;
+#endif
   int64_t limit;
   int64_t freespace;
   int64_t spaceused;

-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || \
+    defined(__DragonFly__)
if (quotactl(device, QCMD(Q_GETQUOTA, USRQUOTA), getuid(), (caddr_t) &dq) == 0)
     {
 #elif defined(__sun)
@@ -281,7 +288,7 @@ getquota (const char * device)
           /* No quota enabled for this user */
           return -1;
         }
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
       spaceused = (int64_t) dq.dqb_curblocks >> 1;
 #elif defined(__APPLE__)
       spaceused = (int64_t) dq.dqb_curbytes;


Thanks! I will try to submit it upstream too.

--
Aleksej Lebedev


Home | Main Index | Thread Index | Old Index