]> git.proxmox.com Git - mirror_zfs.git/commitdiff
FreeBSD: Fix stable/12 after AT_BENEATH removal
authorRyan Moeller <ryan@iXsystems.com>
Fri, 2 Apr 2021 18:06:44 +0000 (14:06 -0400)
committerGitHub <noreply@github.com>
Fri, 2 Apr 2021 18:06:44 +0000 (11:06 -0700)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11827

module/os/freebsd/zfs/zfs_file_os.c

index 06546c12e42009f7b0b5622966b3d66562acc162..908cff6810eb7c98c0a32007241fbac2d28e3d16 100644 (file)
@@ -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));
 }