From: Timo Sirainen Date: Wed, 18 Oct 2017 13:21:52 +0000 (+0300) Subject: quota-fs: Default to quota API v2 if _LINUX_QUOTA_VERSION is undefined. X-Git-Tag: 2.3.0.rc1~728 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39eefc53d06cf9790c6e3180a67b68e89eb71313;p=thirdparty%2Fdovecot%2Fcore.git quota-fs: Default to quota API v2 if _LINUX_QUOTA_VERSION is undefined. glibc v2.25 drops v1 support in sys/quota.h and doesn't define _LINUX_QUOTA_VERSION. --- diff --git a/src/plugins/quota/quota-fs.c b/src/plugins/quota/quota-fs.c index 750019a194..fbd80aaed3 100644 --- a/src/plugins/quota/quota-fs.c +++ b/src/plugins/quota/quota-fs.c @@ -41,10 +41,13 @@ # define dqb_curblocks dqb_curspace #endif -/* Older sys/quota.h doesn't define _LINUX_QUOTA_VERSION at all, which means - it supports only v1 quota */ +/* Very old sys/quota.h doesn't define _LINUX_QUOTA_VERSION at all, which means + it supports only v1 quota. However, new sys/quota.h (glibc 2.25) removes + support for v1 entirely and again it doesn't define it. I guess we can just + assume v2 now, and if someone still wants v1 support they can add + -D_LINUX_QUOTA_VERSION=1 to CFLAGS. */ #ifndef _LINUX_QUOTA_VERSION -# define _LINUX_QUOTA_VERSION 1 +# define _LINUX_QUOTA_VERSION 2 #endif #define mount_type_is_nfs(mount) \