mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-26 10:13:50 +08:00
Merge pull request #293 from trapexit/faccessat
replace nonstandard eaccess with POSIX.1-2008 faccessat
This commit is contained in:
commit
34662da806
|
@ -17,8 +17,9 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "fs_path.hpp"
|
||||
|
@ -48,7 +49,7 @@ _access(Policy::Func::Search searchFunc,
|
|||
|
||||
fs::path::make(basepaths[0],fusepath,fullpath);
|
||||
|
||||
rv = ::eaccess(fullpath.c_str(),mask);
|
||||
rv = ::faccessat(AT_FDCWD,fullpath.c_str(),mask,AT_EACCESS);
|
||||
|
||||
return ((rv == -1) ? -errno : 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user