mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
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. Change-Id: I43fbbc7e5a952d9effbbac16adb9891c36f729bd Reviewed-on: http://gerrit.openafs.org/3989 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
2afbe13788
commit
839b62ab41
@ -813,7 +813,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
|||||||
[struct timespec s;
|
[struct timespec s;
|
||||||
s = current_kernel_time();])
|
s = current_kernel_time();])
|
||||||
AC_CHECK_LINUX_FUNC([d_alloc_anon],
|
AC_CHECK_LINUX_FUNC([d_alloc_anon],
|
||||||
[#include <linux/dcache.h>],
|
[#include <linux/fs.h>],
|
||||||
[d_alloc_anon(NULL);])
|
[d_alloc_anon(NULL);])
|
||||||
AC_CHECK_LINUX_FUNC([do_sync_read],
|
AC_CHECK_LINUX_FUNC([do_sync_read],
|
||||||
[#include <linux/fs.h>],
|
[#include <linux/fs.h>],
|
||||||
|
@ -492,7 +492,7 @@ AC_DEFUN([LINUX_EXPORTS_PROC_ROOT_FS], [
|
|||||||
AC_DEFUN([LINUX_D_PATH_TAKES_STRUCT_PATH], [
|
AC_DEFUN([LINUX_D_PATH_TAKES_STRUCT_PATH], [
|
||||||
AC_CHECK_LINUX_BUILD([if d_path() takes a struct path argument],
|
AC_CHECK_LINUX_BUILD([if d_path() takes a struct path argument],
|
||||||
[ac_cv_linux_d_path_takes_struct_path],
|
[ac_cv_linux_d_path_takes_struct_path],
|
||||||
[#include <linux/dcache.h>],
|
[#include <linux/fs.h>],
|
||||||
[struct path *p; d_path(p, NULL, 0);],
|
[struct path *p; d_path(p, NULL, 0);],
|
||||||
[D_PATH_TAKES_STRUCT_PATH],
|
[D_PATH_TAKES_STRUCT_PATH],
|
||||||
[define if d_path() takes a struct path argument],
|
[define if d_path() takes a struct path argument],
|
||||||
@ -575,7 +575,7 @@ AC_DEFUN([LINUX_HAVE_TRY_TO_FREEZE], [
|
|||||||
AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
|
AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
|
||||||
AC_CHECK_LINUX_BUILD([for dcache_lock],
|
AC_CHECK_LINUX_BUILD([for dcache_lock],
|
||||||
[ac_cv_linux_have_dcache_lock],
|
[ac_cv_linux_have_dcache_lock],
|
||||||
[#include <linux/dcache.h> ],
|
[#include <linux/fs.h> ],
|
||||||
[printk("%p", &dcache_lock);],
|
[printk("%p", &dcache_lock);],
|
||||||
[HAVE_DCACHE_LOCK],
|
[HAVE_DCACHE_LOCK],
|
||||||
[define if dcache_lock exists],
|
[define if dcache_lock exists],
|
||||||
@ -586,7 +586,7 @@ AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [
|
|||||||
AC_DEFUN([LINUX_D_COUNT_IS_INT], [
|
AC_DEFUN([LINUX_D_COUNT_IS_INT], [
|
||||||
AC_CHECK_LINUX_BUILD([if dentry->d_count is an int],
|
AC_CHECK_LINUX_BUILD([if dentry->d_count is an int],
|
||||||
[ac_cv_linux_d_count_int],
|
[ac_cv_linux_d_count_int],
|
||||||
[#include <linux/dcache.h> ],
|
[#include <linux/fs.h> ],
|
||||||
[struct dentry _d;
|
[struct dentry _d;
|
||||||
dget(&_d);
|
dget(&_d);
|
||||||
_d.d_count = 1;],
|
_d.d_count = 1;],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user