diff --git a/acinclude.m4 b/acinclude.m4 index 9b4d94ed0c..d8d7835e79 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1042,6 +1042,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) AC_CHECK_LINUX_FUNC([kernel_setsockopt], [#include ], [kernel_setsockopt(NULL, 0, 0, NULL, 0);]) + AC_CHECK_LINUX_FUNC([locks_lock_file_wait], + [#include ], + [locks_lock_file_wait(NULL, NULL);]) AC_CHECK_LINUX_FUNC([page_follow_link], [#include ], [page_follow_link(0,0);]) diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index e9f6ca11b6..5b3f12b8d8 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 +#if defined(HAVE_LINUX_LOCKS_LOCK_FILE_WAIT) +# define flock_lock_file_wait locks_lock_file_wait +#endif + #if !defined(HAVE_LINUX_DO_SYNC_READ) && !defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER) static inline int do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {