mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
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;
|
||||
}
|
||||
|
||||
if(fstatat(dirfd(d), entry->d_name, &buf, 0) != 0) {
|
||||
if(stat(path, &buf) != 0) {
|
||||
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||
_("could not stat file %s: %s\n"), path, strerror(errno));
|
||||
ret = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user