From 2bafb2f99d85804459acb8994d4057be809f8729 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Wed, 14 Nov 2012 22:12:13 -0500 Subject: [PATCH] Linux: change test for new putname API Replace the existing test with a more robust one that checks for the existence of the new filename structure. Since older kernels are expected to fail this test, we'll get the correct result even if there is unrelated failure, for instance a missing/different header file. Change-Id: Ie50abce37580eab803e9b07e636a1538f4a91a81 Reviewed-on: http://gerrit.openafs.org/8466 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear --- acinclude.m4 | 5 +---- src/afs/LINUX/osi_compat.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 7ba756fac..83ce22d57 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -824,6 +824,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h]) AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h]) + AC_CHECK_LINUX_STRUCT([filename], [name], [fs.h]) AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h]) AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h]) AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h]) @@ -913,10 +914,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) [#include #include ], [path_lookup(NULL, 0, NULL);]) - AC_CHECK_LINUX_FUNC([putname], - [#include - #include ], - [putname(NULL);]) AC_CHECK_LINUX_FUNC([rcu_read_lock], [#include ], [rcu_read_lock();]) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index df40c9b8d..ddf8a47e0 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -524,7 +524,7 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct } #endif -#if defined(HAVE_LINUX_PUTNAME) +#if !defined(STRUCT_FILENAME_HAS_NAME) typedef char *afs_name_t; static inline char * -- 2.39.5