summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/x86_64')
-rw-r--r--libc/sysdeps/linux/x86_64/bits/syscalls.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/x86_64/bits/syscalls.h b/libc/sysdeps/linux/x86_64/bits/syscalls.h
index 8042ab8b9..e4ea4d833 100644
--- a/libc/sysdeps/linux/x86_64/bits/syscalls.h
+++ b/libc/sysdeps/linux/x86_64/bits/syscalls.h
@@ -67,16 +67,18 @@
/* Define a macro which expands inline into the wrapper code for a system
call. */
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
({ \
unsigned long resultvar; \
LOAD_ARGS_##nr (args) \
LOAD_REGS_##nr \
- __asm__ __volatile__ ( \
+ __asm__ __volatile__ ( \
"syscall\n\t" \
: "=a" (resultvar) \
: "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
- (long) resultvar; })
-
+ (long) resultvar; \
+ }) \
+)
#define LOAD_ARGS_0()
#define LOAD_REGS_0
#define ASM_ARGS_0