diff options
author | dholland <dholland@pkgsrc.org> | 2011-12-16 05:21:37 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2011-12-16 05:21:37 +0000 |
commit | d17e6d0a8b5f29ae5e39695d5a7a4496e7c0f96c (patch) | |
tree | f8f6fdcbd38e28d98a0052697d588ea894c7391e /net/netatalk | |
parent | bac20ba2128bfe39ed66cef27ae85813603ea7b5 (diff) | |
download | pkgsrc-d17e6d0a8b5f29ae5e39695d5a7a4496e7c0f96c.tar.gz |
Somebody sent patches upstream to use the -current prerelease libquota API
(such as it is) -- correct it for necessary changes. Closes PR 45714.
Note: this will break again in a few days when that API is removed...
Diffstat (limited to 'net/netatalk')
-rw-r--r-- | net/netatalk/distinfo | 5 | ||||
-rw-r--r-- | net/netatalk/patches/patch-etc_afpd_quota_c | 61 |
2 files changed, 64 insertions, 2 deletions
diff --git a/net/netatalk/distinfo b/net/netatalk/distinfo index cec6680228b..fa67f499b58 100644 --- a/net/netatalk/distinfo +++ b/net/netatalk/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.43 2011/11/29 19:26:28 bouyer Exp $ +$NetBSD: distinfo,v 1.44 2011/12/16 05:21:37 dholland Exp $ SHA1 (netatalk-2.2.1.tar.bz2) = e588b89eced7769f65e213bc4b1b1e4f8035c8b3 RMD160 (netatalk-2.2.1.tar.bz2) = bc55a591fe134d3bf05ca442aa5b5246fd766b8c @@ -16,5 +16,6 @@ SHA1 (patch-aq) = 0793cf5ec158aa27c42b5d8a96651307d7c7c8b6 SHA1 (patch-ar) = 8c6c6169496b9b2cdec6049d2ee45884d5513d11 SHA1 (patch-au) = 8505351fee21ac1effa4dc620b8006c572b913c1 SHA1 (patch-bj) = abbc2809b6b7fe75ec2d2f8f2fa8d6cd9d6de7b0 -SHA1 (patch-macros_quota-check.m4) = 40d1e404905398be03aad6d472bf42af920c7b20 SHA1 (patch-bk) = c3fb7c3a42f148171fa99b6121b099dd4998947a +SHA1 (patch-etc_afpd_quota_c) = 0d0a4d5cb8b8f2a9793096b61c326eecc403587c +SHA1 (patch-macros_quota-check.m4) = 40d1e404905398be03aad6d472bf42af920c7b20 diff --git a/net/netatalk/patches/patch-etc_afpd_quota_c b/net/netatalk/patches/patch-etc_afpd_quota_c new file mode 100644 index 00000000000..6e18243f1e4 --- /dev/null +++ b/net/netatalk/patches/patch-etc_afpd_quota_c @@ -0,0 +1,61 @@ +$NetBSD: patch-etc_afpd_quota_c,v 1.1 2011/12/16 05:21:37 dholland Exp $ + +Account for changes in prerelease NetBSD quota API. + +--- etc/afpd/quota.c~ 2011-08-18 12:23:44.000000000 +0000 ++++ etc/afpd/quota.c +@@ -49,13 +49,25 @@ char *strchr (), *strrchr (); + + #ifdef HAVE_LIBQUOTA + #include <quota/quota.h> ++#include <quota/quotaprop.h> ++ ++/* Sleazy. */ ++#if defined(__NetBSD__) && defined(_QUOTA_QUOTA_H) ++/* old names in -current only from ~March 2011 through ~Nov 2011 */ ++#define quotaval ufs_quota_entry ++#define qv_hardlimit ufsqe_hardlimit ++#define qv_softlimit ufsqe_softlimit ++#define qv_usage ufsqe_cur ++#define qv_expiretime ufsqe_time ++#define qv_grace ufsqe_grace ++#endif + + static int + getfreespace(struct vol *vol, VolSpace *bfree, VolSpace *btotal, + uid_t uid, const char *classq) + { + int retq; +- struct ufs_quota_entry ufsq[QUOTA_NLIMITS]; ++ struct quotaval ufsq[QUOTA_NLIMITS]; + time_t now; + + if (time(&now) == -1) { +@@ -77,19 +89,19 @@ getfreespace(struct vol *vol, VolSpace * + if (retq < 1) + return retq; + +- switch(QL_STATUS(quota_check_limit(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur, 1, +- ufsq[QUOTA_LIMIT_BLOCK].ufsqe_softlimit, +- ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit, +- ufsq[QUOTA_LIMIT_BLOCK].ufsqe_time, now))) { ++ switch(QL_STATUS(quota_check_limit(ufsq[QUOTA_LIMIT_BLOCK].qv_usage, 1, ++ ufsq[QUOTA_LIMIT_BLOCK].qv_softlimit, ++ ufsq[QUOTA_LIMIT_BLOCK].qv_hardlimit, ++ ufsq[QUOTA_LIMIT_BLOCK].qv_expiretime, now))) { + case QL_S_DENY_HARD: + case QL_S_DENY_GRACE: + *bfree = 0; +- *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur); ++ *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].qv_usage); + break; + default: +- *bfree = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit - +- ufsq[QUOTA_LIMIT_BLOCK].ufsqe_cur); +- *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].ufsqe_hardlimit); ++ *bfree = dbtob(ufsq[QUOTA_LIMIT_BLOCK].qv_hardlimit - ++ ufsq[QUOTA_LIMIT_BLOCK].qv_usage); ++ *btotal = dbtob(ufsq[QUOTA_LIMIT_BLOCK].qv_hardlimit); + break; + } + return 1; |