summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 23:20:30 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 23:20:30 +0000
commit190da1cd0c221438c563b5b605ff811e9075e210 (patch)
treeca5177a27d154dfa08b85d678ce6e33ac0672522 /libc/sysdeps/linux/i386
parente0605c73da33c6f06b13c4bdf5cb42db97cd4b30 (diff)
sync with psm: update errno handling to be the same on all arches
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r--libc/sysdeps/linux/i386/bits/syscalls.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
index 58475e3af..73f858521 100644
--- a/libc/sysdeps/linux/i386/bits/syscalls.h
+++ b/libc/sysdeps/linux/i386/bits/syscalls.h
@@ -4,8 +4,6 @@
# error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
#endif
-#include <errno.h>
-
/* This includes the `__NR_<name>' syscall numbers taken from the Linux kernel
* header files. It also defines the traditional `SYS_<name>' macros for older
* programs. */
@@ -18,6 +16,10 @@
#ifndef __ASSEMBLER__
+#include <errno.h>
+
+#define SYS_ify(syscall_name) (__NR_##syscall_name)
+
/* We need some help from the assembler to generate optimal code. We
define some macros here which later will be used. */