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>
This commit is contained in:
parent
c981f5ad76
commit
be1ffedaf6
|
@ -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…
Reference in New Issue