Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2016-06-27 22:23:43 -0400
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-08 23:27:41 -0400
commitcebb20762dc9b15815a72dec190f566e6928582b (patch)
tree1def599873cb3bc7619813b338674cc26b83ce9e /lib
parente770b5728bf048c44503e040f81786c6c56eebc8 (diff)
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 be1ffedaf6fc44aeb9da235d64889dac71e9bf24)
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/hook.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/hook.c b/lib/libalpm/hook.c
index 9b4f215d..ccde225e 100644
--- a/lib/libalpm/hook.c
+++ b/lib/libalpm/hook.c
@@ -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;