Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Fri, 10 Jun 2005 17:28:32 +0000 (17:28 +0000)
committeradilger <adilger>
Fri, 10 Jun 2005 17:28:32 +0000 (17:28 +0000)
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

index 924e4fb..bd94f59 100644 (file)
@@ -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