aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2021-04-02 14:06:44 -0400
committerTony Hutter <[email protected]>2021-06-23 13:22:14 -0700
commit87a520c4e7368f9feebd8fe1a732c6fdea85dd98 (patch)
treeb23c4b52318b948547fa2e3d0fca0630a5f4ca04 /module
parentd02bcae0c4f9e5f09f0020e575a50e0f29718f30 (diff)
FreeBSD: Fix stable/12 after AT_BENEATH removal
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11827
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/zfs/zfs_file_os.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/module/os/freebsd/zfs/zfs_file_os.c b/module/os/freebsd/zfs/zfs_file_os.c
index 8fb259f4b..bfdc4159a 100644
--- a/module/os/freebsd/zfs/zfs_file_os.c
+++ b/module/os/freebsd/zfs/zfs_file_os.c
@@ -295,14 +295,12 @@ zfs_file_unlink(const char *fnamep)
#if __FreeBSD_version >= 1300018
rc = kern_funlinkat(curthread, AT_FDCWD, fnamep, FD_NONE, seg, 0, 0);
-#else
-#ifdef AT_BENEATH
+#elif __FreeBSD_version >= 1202504 || defined(AT_BENEATH)
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
seg, 0, 0);
#else
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
seg, 0);
#endif
-#endif
return (SET_ERROR(rc));
}