summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/syscalls.c')
-rw-r--r--libc/sysdeps/linux/common/syscalls.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index c0630e1fd..a0bad06be 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -135,11 +135,19 @@ _syscall3(int, mknod, const char *, pathname, mode_t, mode, dev_t, dev);
_syscall2(int, chmod, const char *, path, mode_t, mode);
#endif
+/* Old kernels don't have lchown -- do chown instead. This
+ * is sick and wrong, but at least things will compile.
+ * They may not follow links when they should though... */
+#ifndef __NR_lchown
+#define __NR_lchown __NR_chown
+#endif
+
//#define __NR_lchown 16
#ifdef L_lchown
#include <unistd.h>
_syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group);
#endif
+#endif
//#define __NR_break 17
@@ -325,11 +333,13 @@ gid_t getegid(void)
//#define __NR_acct 51
+#ifdef __NR_umount2 /* Old kernels don't have umount2 */
//#define __NR_umount2 52
#ifdef L_umount2
#include <sys/mount.h>
_syscall2(int, umount2, const char *, special_file, int, flags);
#endif
+#endif
//#define __NR_lock 53
@@ -639,6 +649,7 @@ _syscall2(int, statfs, const char *, path, struct statfs *, buf);
_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
#endif
+#ifndef __HAS_NO_MMU__
//#define __NR_ioperm 101
#ifdef L_ioperm
#include <sys/io.h>
@@ -646,6 +657,7 @@ syscall3(int, ioperm, unsigned, long, from, unsigned long, num, int,
turn_on);
#endif
+#endif
//#define __NR_socketcall 102
#ifdef L_socketcall
@@ -737,11 +749,13 @@ int fstat(int fd, struct libc_stat *cstat)
//#define __NR_olduname 109
+#ifndef __HAS_NO_MMU__
//#define __NR_iopl 110
#ifdef L_iopl
#include <sys/io.h>
_syscall1(int, iopl, int, level);
#endif
+#endif
//#define __NR_vhangup 111
#ifdef L_vhangup