From 20ee16b8cbd11cb6a8016c22ceecbb38bb12b39b Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 24 Jul 2013 00:02:16 +0000 Subject: [PATCH] fix Transmission 2.81 FTBFS in OpenBSD, patch by naddy --- 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 035590e6f..1b8a33bd2 100644 --- a/libtransmission/platform-quota.c +++ b/libtransmission/platform-quota.c @@ -18,7 +18,7 @@ #ifndef WIN32 #include /* types needed by quota.h */ - #ifdef __FreeBSD__ + #if defined(__FreeBSD__) || defined(__OpenBSD__) #include /* quotactl() */ #elif defined (__sun) #include /* quotactl */ @@ -203,7 +203,7 @@ getquota (const char * device) int64_t freespace; int64_t spaceused; -#if defined(__FreeBSD__) || defined(SYS_DARWIN) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(SYS_DARWIN) if (quotactl(device, QCMD(Q_GETQUOTA, USRQUOTA), getuid(), (caddr_t) &dq) == 0) { #elif defined(__sun) @@ -235,7 +235,7 @@ getquota (const char * device) /* No quota enabled for this user */ return -1; } -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) spaceused = (int64_t) dq.dqb_curblocks >> 1; #elif defined(SYS_DARWIN) spaceused = (int64_t) dq.dqb_curbytes; -- 2.40.0