hook.c: replace fstatat with stat
macOS < 10.10 do not provide fstatat. We were constructing the full
path to the hook file for all other operations anyway, so there was no
real benefit to using fstatat.
Fixes FS#49771
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit be1ffedaf6
)
This commit is contained in:
parent
e770b5728b
commit
cebb20762d
1 changed files with 1 additions and 1 deletions
|
@ -675,7 +675,7 @@ int _alpm_hook_run(alpm_handle_t *handle, alpm_hook_when_t when)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fstatat(dirfd(d), entry->d_name, &buf, 0) != 0) {
|
if(stat(path, &buf) != 0) {
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
_("could not stat file %s: %s\n"), path, strerror(errno));
|
_("could not stat file %s: %s\n"), path, strerror(errno));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue