Package: transmission / 2.94-2

fix_freebsd_quota_include.patch Patch series | download
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
39
From: Sandro Tosi <morph@debian.org>
Date: Sun, 6 May 2018 15:35:38 -0400
Subject: fix_freebsd_quota_include

---
 libtransmission/platform-quota.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
index e7d1f6d..91579e0 100644
--- a/libtransmission/platform-quota.c
+++ b/libtransmission/platform-quota.c
@@ -16,7 +16,7 @@
 #ifndef _WIN32
  #include <unistd.h> /* getuid() */
  #include <sys/types.h> /* types needed by quota.h */
- #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
   #include <ufs/ufs/quota.h> /* quotactl() */
  #elif defined (__NetBSD__)
   #include <sys/param.h>
@@ -249,7 +249,7 @@ getquota (const char * device)
   int64_t freespace;
   int64_t spaceused;
 
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__APPLE__)
   if (quotactl(device, QCMD(Q_GETQUOTA, USRQUOTA), getuid(), (caddr_t) &dq) == 0)
     {
 #elif defined(__sun)
@@ -281,7 +281,7 @@ getquota (const char * device)
           /* No quota enabled for this user */
           return -1;
         }
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
       spaceused = (int64_t) dq.dqb_curblocks >> 1;
 #elif defined(__APPLE__)
       spaceused = (int64_t) dq.dqb_curbytes;