diff --git a/acinclude.m4 b/acinclude.m4 index bcf8ecf48f..6d34609ed7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -973,6 +973,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_FUNC([do_sync_read], [#include ], [do_sync_read(NULL, NULL, 0, NULL);]) + AC_CHECK_LINUX_FUNC([file_dentry], + [#include ], + [struct file *f; file_dentry(f);]) AC_CHECK_LINUX_FUNC([find_task_by_pid], [#include ], [pid_t p; find_task_by_pid(p);]) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index a25fd2ee4a..8e72161bf4 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -47,6 +47,10 @@ typedef struct path afs_linux_path_t; # endif #endif +#ifndef HAVE_LINUX_FILE_DENTRY +#define file_dentry(file) ((file)->f_dentry) +#endif + #if defined(HAVE_LINUX_LOCKS_LOCK_FILE_WAIT) # define flock_lock_file_wait locks_lock_file_wait #endif