summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/bits/syscalls-common.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h
index 1b84d9e2b..faebd1b71 100644
--- a/libc/sysdeps/linux/common/bits/syscalls-common.h
+++ b/libc/sysdeps/linux/common/bits/syscalls-common.h
@@ -40,21 +40,27 @@
/* Just like INLINE_SYSCALL(), but take a non-constant syscall (NCS) argument */
#ifndef INLINE_SYSCALL_NCS
# define INLINE_SYSCALL_NCS(name, nr, args...) \
-({ \
+(__extension__ \
+ ({ \
INTERNAL_SYSCALL_DECL(__err); \
- long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
- if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \
+ (__extension__ \
+ ({ \
+ long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
+ if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \
__set_errno(INTERNAL_SYSCALL_ERRNO(__res, __err)); \
__res = -1L; \
- } \
- __res; \
-})
+ } \
+ __res; \
+ }) \
+ ); \
+ }) \
+)
#endif
#ifndef INLINE_SYSCALL_NOERR_NCS
# define INLINE_SYSCALL_NOERR_NCS(name, nr, args...) \
({ \
- INTERNAL_SYSCALL_DECL(__err); \
- long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
+ /*INTERNAL_SYSCALL_DECL(__err);*/ \
+ long __res = INTERNAL_SYSCALL_NCS(name, /*__err*/, nr, args); \
__res; \
})
#endif