From b6b4ddad63ed7b7b39939079c23d708c9d45e15b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 29 Jun 2018 18:15:07 +0200 Subject: executor: improve fuchsia fallback coverage --- executor/executor_fuchsia.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'executor/executor_fuchsia.cc') diff --git a/executor/executor_fuchsia.cc b/executor/executor_fuchsia.cc index 2377ad475..c240f3bff 100644 --- a/executor/executor_fuchsia.cc +++ b/executor/executor_fuchsia.cc @@ -38,9 +38,9 @@ long execute_syscall(const call_t* c, long a0, long a1, long a2, long a3, long a NONFAILING(res = c->call(a0, a1, a2, a3, a4, a5, a6, a7, a8)); if (strncmp(c->name, "zx_", 3) == 0) { // Convert zircon error convention to the libc convention that executor expects. - if (res == ZX_OK) + if (res == ZX_OK || !strcmp(c->name, "zx_clock_get") || !strcmp(c->name, "zx_ticks_get")) return 0; - errno = res; + errno = (-res) & 0x7f; return -1; } // We cast libc functions to signature returning long, -- cgit mrf-deployment