diff options
author | Ryan Moeller <[email protected]> | 2021-04-02 14:06:44 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-02 11:06:44 -0700 |
commit | 02aaf11fc793e0c632223a95d24db0969d0ba602 (patch) | |
tree | 74df5665cb6d9481d476024c38a6ba451a327481 | |
parent | fe6babced2f3a5eff9d70e380f2054d5f18fa4c0 (diff) |
FreeBSD: Fix stable/12 after AT_BENEATH removal
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #11827
-rw-r--r-- | module/os/freebsd/zfs/zfs_file_os.c | 4 |
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 06546c12e..908cff681 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)); } |