From be1ffedaf6fc44aeb9da235d64889dac71e9bf24 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Mon, 27 Jun 2016 22:23:43 -0400 Subject: 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 Signed-off-by: Allan McRae --- lib/libalpm/hook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm') 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; -- cgit v1.2.3-70-g09d2