aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_fuchsia.h
diff options
context:
space:
mode:
authormunjinoo <2jwdream7029@naver.com>2019-05-06 13:55:50 +0900
committerDmitry Vyukov <dvyukov@google.com>2019-05-07 08:48:35 +0200
commit001e36bc7862e1663aa5e6608882e78f08ebab41 (patch)
tree68f14264f40fe4a08b765ea4e3a225077307dec3 /executor/executor_fuchsia.h
parent04e9d8cedd9dc356d116c5387eac8c1ea9d547f7 (diff)
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.
Diffstat (limited to 'executor/executor_fuchsia.h')
-rw-r--r--executor/executor_fuchsia.h8
1 files changed, 4 insertions, 4 deletions
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;
}