summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2016-06-28 04:23:43 +0200
committerAllan McRae <allan@archlinux.org>2016-08-30 10:10:40 +0200
commitbe1ffedaf6fc44aeb9da235d64889dac71e9bf24 (patch)
tree3914802c4d07afb05fafe2c2b6971c9f8c13899e /lib
parentc981f5ad76cb77363dcb4ebcc199670c3378995f (diff)
downloadpacman-be1ffedaf6fc44aeb9da235d64889dac71e9bf24.tar.gz
pacman-be1ffedaf6fc44aeb9da235d64889dac71e9bf24.tar.xz
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>
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;