diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index 075b9e111b10..b4767d1ece89 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -68,7 +68,11 @@ lseek_execute( loff_t offset, loff_t maxsize) { +#ifdef FMODE_UNSIGNED_OFFSET if (offset < 0 && !(filp->f_mode & FMODE_UNSIGNED_OFFSET)) +#else + if (offset < 0 && !(filp->f_op->fop_flags & FOP_UNSIGNED_OFFSET)) +#endif return (-EINVAL); if (offset > maxsize)