aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/sysdep.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h
index 3dc2bad50e..83f2323eda 100644
--- a/sysdeps/unix/sysv/linux/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sysdep.h
@@ -35,13 +35,19 @@
})
#endif
+#ifdef __CHERI_PURE_CAPABILITY__
+# define syscall_ret_t intptr_t
+#else
+# define syscall_ret_t long
+#endif
+
/* Define a macro which expands into the inline wrapper code for a system
call. It sets the errno and returns -1 on a failure, or the syscall
return value otherwise. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ \
- long int sc_ret = INTERNAL_SYSCALL (name, nr, args); \
+ syscall_ret_t sc_ret = INTERNAL_SYSCALL (name, nr, args); \
__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (sc_ret)) \
? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (sc_ret)) \
: sc_ret; \