From e8380976956a5b230c609f178a0ef364c8245039 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 10 Jun 2005 17:28:32 +0000 Subject: [PATCH] Branch b1_4 Fix build for BGL ION kernel (2.4.19) which doesn't declare the quota stuff even internally. Obvious solutions like removing #ifndef (__KERNEL__) caused newer kernel builds to fail because of duplicate declarations, and just checking the LINUX_VERSION_CODE directly caused problems for liblustre. --- lustre/include/lustre/lustre_user.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index 924e4fb..bd94f59 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -133,7 +133,14 @@ struct if_quotacheck { }; #ifndef __KERNEL__ +#define NEED_QUOTA_DEFS +#else +# if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) +# define NEED_QUOTA_DEFS +# endif +#endif +#ifdef NEED_QUOTA_DEFS #ifndef QUOTABLOCK_BITS #define QUOTABLOCK_BITS 10 #endif -- 1.8.3.1