From 001e36bc7862e1663aa5e6608882e78f08ebab41 Mon Sep 17 00:00:00 2001 From: munjinoo <2jwdream7029@naver.com> Date: Mon, 6 May 2019 13:55:50 +0900 Subject: executor: change syscall argument type to intptr_t The type size of long depends on compiler. Therefore, changing to intptr_t makes it depends on architecture. --- executor/executor_fuchsia.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'executor/executor_fuchsia.h') diff --git a/executor/executor_fuchsia.h b/executor/executor_fuchsia.h index 0703a07dc..9256f6b02 100644 --- a/executor/executor_fuchsia.h +++ b/executor/executor_fuchsia.h @@ -17,9 +17,9 @@ static void os_init(int argc, char** argv, void* data, size_t data_size) fail("mmap of data segment failed with: %d", status); } -static long execute_syscall(const call_t* c, long a[kMaxArgs]) +static intptr_t execute_syscall(const call_t* c, intptr_t a[kMaxArgs]) { - long res = c->call(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); + intptr_t res = c->call(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]); if (strncmp(c->name, "zx_", 3) == 0) { // Convert zircon error convention to the libc convention that executor expects. // The following calls return arbitrary integers instead of error codes. @@ -32,9 +32,9 @@ static long execute_syscall(const call_t* c, long a[kMaxArgs]) errno = (-res) & 0x7f; return -1; } - // We cast libc functions to signature returning long, + // We cast libc functions to signature returning intptr_t, // as the result int -1 is returned as 0x00000000ffffffff rather than full -1. if (res == 0xffffffff) - res = (long)-1; + res = (intptr_t)-1; return res; } -- cgit mrf-deployment