mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
FreeBSD: Fix 12.2-STABLE after AT_BENEATH MFC
AT_BENEATH was merged to stable/12, where kern_unlinkat takes a non-const path. DECONST the path passed to kern_unlinkat in the case where AT_BENEATH is defined. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11139
This commit is contained in:
parent
5fa356ea44
commit
d1e4ded7bc
@ -296,7 +296,8 @@ zfs_file_unlink(const char *fnamep)
|
||||
rc = kern_funlinkat(curthread, AT_FDCWD, fnamep, FD_NONE, seg, 0, 0);
|
||||
#else
|
||||
#ifdef AT_BENEATH
|
||||
rc = kern_unlinkat(curthread, AT_FDCWD, fnamep, seg, 0, 0);
|
||||
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
|
||||
seg, 0, 0);
|
||||
#else
|
||||
rc = kern_unlinkat(curthread, AT_FDCWD, __DECONST(char *, fnamep),
|
||||
seg, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user