FreeBSD: Fix stable/12 after AT_BENEATH removal

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11827
This commit is contained in:
Ryan Moeller 2021-04-02 14:06:44 -04:00 committed by Tony Hutter
parent d02bcae0c4
commit 87a520c4e7
1 changed files with 1 additions and 3 deletions

View File

@ -295,14 +295,12 @@ zfs_file_unlink(const char *fnamep)
#if __FreeBSD_version >= 1300018 #if __FreeBSD_version >= 1300018
rc = kern_funlinkat(curthread, AT_FDCWD, fnamep, FD_NONE, seg, 0, 0); rc = kern_funlinkat(curthread, AT_FDCWD, fnamep, FD_NONE, seg, 0, 0);
#else #elif __FreeBSD_version >= 1202504 || defined(AT_BENEATH)
#ifdef AT_BENEATH
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep), rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
seg, 0, 0); seg, 0, 0);
#else #else
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep), rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
seg, 0); seg, 0);
#endif
#endif #endif
return (SET_ERROR(rc)); return (SET_ERROR(rc));
} }