From 5aebd8d5416f242a84676cac3874fbc71c3cef44 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 18 Feb 2011 15:49:03 -0600 Subject: [PATCH] LINUX: Replace dcache.h for fs.h in config tests When detecting if we have certain Linux kernel features, we only include dcache.h. On some kernel versions (at least 2.4.27), compilation fails if we include dcache.h directly (due to e.g. list_head not being defined), which causes false negatives in tests such as the test for dcache_lock. If we instead include fs.h, which includes dcache.h, the tests succeed when they should succeed. So, use fs.h instead of dcache.h. Reviewed-on: http://gerrit.openafs.org/3989 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 839b62ab414fde02e1a2093bc036c63c708d861d) Change-Id: Ia8ea701c81bad9dc293ecb2848bd971052743c81 Reviewed-on: http://gerrit.openafs.org/4025 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- acinclude.m4 | 2 +- src/cf/linux-test4.m4 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 891e75c02c..0d99559f86 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -813,7 +813,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) [struct timespec s; s = current_kernel_time();]) AC_CHECK_LINUX_FUNC([d_alloc_anon], - [#include ], + [#include ], [d_alloc_anon(NULL);]) AC_CHECK_LINUX_FUNC([do_sync_read], [#include ], diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index cf6045a235..64bd8abd9e 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -492,7 +492,7 @@ AC_DEFUN([LINUX_EXPORTS_PROC_ROOT_FS], [ AC_DEFUN([LINUX_D_PATH_TAKES_STRUCT_PATH], [ AC_CHECK_LINUX_BUILD([if d_path() takes a struct path argument], [ac_cv_linux_d_path_takes_struct_path], - [#include ], + [#include ], [struct path *p; d_path(p, NULL, 0);], [D_PATH_TAKES_STRUCT_PATH], [define if d_path() takes a struct path argument], @@ -585,7 +585,7 @@ AC_DEFUN([LINUX_HAVE_TRY_TO_FREEZE], [ AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [ AC_CHECK_LINUX_BUILD([for dcache_lock], [ac_cv_linux_have_dcache_lock], - [#include ], + [#include ], [printk("%p", &dcache_lock);], [HAVE_DCACHE_LOCK], [define if dcache_lock exists], @@ -596,7 +596,7 @@ AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [ AC_DEFUN([LINUX_D_COUNT_IS_INT], [ AC_CHECK_LINUX_BUILD([if dentry->d_count is an int], [ac_cv_linux_d_count_int], - [#include ], + [#include ], [struct dentry _d; dget(&_d); _d.d_count = 1;],