From 39eefc53d06cf9790c6e3180a67b68e89eb71313 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 18 Oct 2017 16:21:52 +0300 Subject: [PATCH] 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. --- src/plugins/quota/quota-fs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) \ -- 2.47.3