s3:sysquota_xfs: check and include the right fs header file for xfs quotas
authorBjörn Jacke <bj@sernet.de>
Thu, 6 Sep 2012 15:26:55 +0000 (17:26 +0200)
committerBjoern Jacke <bj@sernet.de>
Fri, 7 Sep 2012 12:15:57 +0000 (14:15 +0200)
source3/configure.in
source3/lib/sysquotas_xfs.c
source3/wscript

index c144e6fc82b5c6ca9e39d04a04c524b70ffe6d3b..e76e4e42c0de6105d7b4b377d96dc744cd51d91f 100644 (file)
@@ -4554,7 +4554,6 @@ case "$host_os" in
            AC_MSG_CHECKING(whether to use the lib/sysquotas_linux.c builtin support)
            AC_MSG_RESULT(yes)
 
-           AC_DEFINE(HAVE_LINUX_XFS_QUOTAS,1,[Whether Linux xfs quota support is available])
            AC_MSG_CHECKING(whether to use the lib/sysquotas_xfs.c builtin support)
            AC_MSG_RESULT(yes)
            ;;
@@ -4575,8 +4574,10 @@ AC_CHECK_HEADER(asm/types.h,[
 # For quotas on Veritas VxFS filesystems
 AC_CHECK_HEADERS(sys/fs/vx_quota.h)
 
-# For quotas on Linux XFS filesystems
-AC_CHECK_HEADERS(linux/dqblk_xfs.h)
+# For quotas on XFS filesystems, Linux style
+AC_CHECK_HEADERS(xfs/xqm.h,[
+           AC_DEFINE(HAVE_LINUX_XFS_QUOTAS,1,[Whether Linux xfs quota support is available])
+       ])
 
 # For sys/quota.h and linux/quota.h
 AC_CHECK_HEADERS(sys/quota.h)
index 1e438e9a6d67b040c1c1818de1d81c129055fb43..7da40efd9b243ae3c13879aaa14120485f48bcd7 100644 (file)
 
 #ifdef HAVE_LINUX_XFS_QUOTAS
 #include "samba_linux_quota.h"
-#ifdef HAVE_LINUX_DQBLK_XFS_H
-#include <linux/dqblk_xfs.h>
+#ifdef HAVE_XFS_XQM_H
+#include <xfs/xqm.h>
 #endif
+
 #define HAVE_GROUP_QUOTA
 #else /* IRIX */
 #include <sys/quota.h> 
index 39a9b92f55d6ca69beb09d08ce136fc9f3f498b2..a496aaa306e91c82a82f31e29a5996664d5daa03 100755 (executable)
@@ -1189,7 +1189,7 @@ main() {
         # For quotas on Veritas VxFS filesystems
         conf.CHECK_HEADERS('sys/fs/vx_quota.h')
         # For quotas on Linux XFS filesystems
-        conf.CHECK_HEADERS('linux/dqblk_xfs.h')
+        conf.CHECK_HEADERS('xfs/xqm.h')
         # For sys/quota.h and linux/quota.h
         conf.CHECK_HEADERS('sys/quota.h')
         # For quotas on BSD systems