summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2010-04-19 10:37:03 -0400
committerSteve Kondik <shade@chemlab.org>2010-12-17 21:44:22 -0500
commit461d7d8ac3f26dbeacf9cc597de4f8cefd076ff7 (patch)
treed8d20c083ba184f55d96e775c4f303a5d1ea7de5
parent7bbd4580afe0347892a0680b5917ec7df38c003a (diff)
downloadbionic-461d7d8ac3f26dbeacf9cc597de4f8cefd076ff7.zip
bionic-461d7d8ac3f26dbeacf9cc597de4f8cefd076ff7.tar.gz
bionic-461d7d8ac3f26dbeacf9cc597de4f8cefd076ff7.tar.bz2
Additions necessary for busybox
Change-Id: I46f67991858ca1399f6b28a3a5c286b7f3ef0888
-rw-r--r--libc/SYSCALLS.TXT8
-rw-r--r--libc/arch-arm/syscalls.mk5
-rw-r--r--libc/arch-arm/syscalls/adjtimex.S19
-rw-r--r--libc/arch-arm/syscalls/getsid.S19
-rw-r--r--libc/arch-arm/syscalls/stime.S19
-rw-r--r--libc/arch-arm/syscalls/swapoff.S19
-rw-r--r--libc/arch-arm/syscalls/swapon.S19
-rw-r--r--libc/arch-sh/syscalls.mk5
-rw-r--r--libc/arch-sh/syscalls/adjtimex.S32
-rw-r--r--libc/arch-sh/syscalls/getsid.S32
-rw-r--r--libc/arch-sh/syscalls/readlinkat.S32
-rw-r--r--libc/arch-sh/syscalls/signalfd.S32
-rw-r--r--libc/arch-sh/syscalls/stime.S32
-rw-r--r--libc/arch-sh/syscalls/swapoff.S32
-rw-r--r--libc/arch-sh/syscalls/swapon.S32
-rw-r--r--libc/arch-x86/syscalls.mk5
-rw-r--r--libc/arch-x86/syscalls/adjtimex.S23
-rw-r--r--libc/arch-x86/syscalls/getsid.S23
-rw-r--r--libc/arch-x86/syscalls/stime.S23
-rw-r--r--libc/arch-x86/syscalls/swapoff.S23
-rw-r--r--libc/arch-x86/syscalls/swapon.S26
-rw-r--r--libc/include/mntent.h1
-rw-r--r--libc/include/sys/linux-syscalls.h5
-rw-r--r--libc/include/sys/linux-unistd.h5
-rwxr-xr-xlibc/tools/checksyscalls.py4
25 files changed, 472 insertions, 3 deletions
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 0850b82..a2b7a32 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -173,7 +173,7 @@ int __timer_gettime:timer_gettime(timer_t, struct itimerspec*)
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262
int __timer_delete:timer_delete(timer_t) 261,263
int utimes(const char*, const struct timeval tvp[2]) 269, 271
-
+int adjtimex(struct timex *) 124
# signals
int sigaction(int, const struct sigaction *, struct sigaction *) 67
int sigprocmask(int, const sigset_t *, sigset_t *) 126
@@ -264,3 +264,9 @@ int eventfd:eventfd2(unsigned int, int) 356,328
# ARM-specific ARM_NR_BASE == 0x0f0000 == 983040
int __set_tls:ARM_set_tls(void*) 983045,-1
int cacheflush:ARM_cacheflush(long start, long end, long flags) 983042,-1
+
+# busybox: 2010-01-17
+int stime(time_t *) 25
+int swapon(const char *, int) 87
+int swapoff(const char *) 115
+pid_t getsid(pid_t pid) 147
diff --git a/libc/arch-arm/syscalls.mk b/libc/arch-arm/syscalls.mk
index ba78c18..869e613 100644
--- a/libc/arch-arm/syscalls.mk
+++ b/libc/arch-arm/syscalls.mk
@@ -123,6 +123,7 @@ syscall_src += arch-arm/syscalls/__timer_gettime.S
syscall_src += arch-arm/syscalls/__timer_getoverrun.S
syscall_src += arch-arm/syscalls/__timer_delete.S
syscall_src += arch-arm/syscalls/utimes.S
+syscall_src += arch-arm/syscalls/adjtimex.S
syscall_src += arch-arm/syscalls/sigaction.S
syscall_src += arch-arm/syscalls/sigprocmask.S
syscall_src += arch-arm/syscalls/__sigsuspend.S
@@ -175,3 +176,7 @@ syscall_src += arch-arm/syscalls/poll.S
syscall_src += arch-arm/syscalls/eventfd.S
syscall_src += arch-arm/syscalls/__set_tls.S
syscall_src += arch-arm/syscalls/cacheflush.S
+syscall_src += arch-arm/syscalls/stime.S
+syscall_src += arch-arm/syscalls/swapon.S
+syscall_src += arch-arm/syscalls/swapoff.S
+syscall_src += arch-arm/syscalls/getsid.S
diff --git a/libc/arch-arm/syscalls/adjtimex.S b/libc/arch-arm/syscalls/adjtimex.S
new file mode 100644
index 0000000..c89ff1b
--- /dev/null
+++ b/libc/arch-arm/syscalls/adjtimex.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type adjtimex, #function
+ .globl adjtimex
+ .align 4
+ .fnstart
+
+adjtimex:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_adjtimex
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/arch-arm/syscalls/getsid.S b/libc/arch-arm/syscalls/getsid.S
new file mode 100644
index 0000000..6d9b3af
--- /dev/null
+++ b/libc/arch-arm/syscalls/getsid.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type getsid, #function
+ .globl getsid
+ .align 4
+ .fnstart
+
+getsid:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_getsid
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/arch-arm/syscalls/stime.S b/libc/arch-arm/syscalls/stime.S
new file mode 100644
index 0000000..05f131b
--- /dev/null
+++ b/libc/arch-arm/syscalls/stime.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type stime, #function
+ .globl stime
+ .align 4
+ .fnstart
+
+stime:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_stime
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/arch-arm/syscalls/swapoff.S b/libc/arch-arm/syscalls/swapoff.S
new file mode 100644
index 0000000..f1faae1
--- /dev/null
+++ b/libc/arch-arm/syscalls/swapoff.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapoff, #function
+ .globl swapoff
+ .align 4
+ .fnstart
+
+swapoff:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_swapoff
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/arch-arm/syscalls/swapon.S b/libc/arch-arm/syscalls/swapon.S
new file mode 100644
index 0000000..fb67d81
--- /dev/null
+++ b/libc/arch-arm/syscalls/swapon.S
@@ -0,0 +1,19 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapon, #function
+ .globl swapon
+ .align 4
+ .fnstart
+
+swapon:
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_swapon
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+ .fnend
diff --git a/libc/arch-sh/syscalls.mk b/libc/arch-sh/syscalls.mk
index a87419d..8916785 100644
--- a/libc/arch-sh/syscalls.mk
+++ b/libc/arch-sh/syscalls.mk
@@ -126,6 +126,7 @@ syscall_src += arch-sh/syscalls/__timer_gettime.S
syscall_src += arch-sh/syscalls/__timer_getoverrun.S
syscall_src += arch-sh/syscalls/__timer_delete.S
syscall_src += arch-sh/syscalls/utimes.S
+syscall_src += arch-sh/syscalls/adjtimex.S
syscall_src += arch-sh/syscalls/sigaction.S
syscall_src += arch-sh/syscalls/sigprocmask.S
syscall_src += arch-sh/syscalls/__sigsuspend.S
@@ -162,3 +163,7 @@ syscall_src += arch-sh/syscalls/inotify_add_watch.S
syscall_src += arch-sh/syscalls/inotify_rm_watch.S
syscall_src += arch-sh/syscalls/poll.S
syscall_src += arch-sh/syscalls/eventfd.S
+syscall_src += arch-sh/syscalls/stime.S
+syscall_src += arch-sh/syscalls/swapon.S
+syscall_src += arch-sh/syscalls/swapoff.S
+syscall_src += arch-sh/syscalls/getsid.S
diff --git a/libc/arch-sh/syscalls/adjtimex.S b/libc/arch-sh/syscalls/adjtimex.S
new file mode 100644
index 0000000..255bd47
--- /dev/null
+++ b/libc/arch-sh/syscalls/adjtimex.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type adjtimex, @function
+ .globl adjtimex
+ .align 4
+
+adjtimex:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(1 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_adjtimex_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_adjtimex_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_adjtimex
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/getsid.S b/libc/arch-sh/syscalls/getsid.S
new file mode 100644
index 0000000..73d5e32
--- /dev/null
+++ b/libc/arch-sh/syscalls/getsid.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type getsid, @function
+ .globl getsid
+ .align 4
+
+getsid:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(1 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_getsid_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_getsid_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_getsid
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/readlinkat.S b/libc/arch-sh/syscalls/readlinkat.S
new file mode 100644
index 0000000..5b23060
--- /dev/null
+++ b/libc/arch-sh/syscalls/readlinkat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type readlinkat, @function
+ .globl readlinkat
+ .align 4
+
+readlinkat:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(4 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_readlinkat_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_readlinkat_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_readlinkat
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/signalfd.S b/libc/arch-sh/syscalls/signalfd.S
new file mode 100644
index 0000000..896e909
--- /dev/null
+++ b/libc/arch-sh/syscalls/signalfd.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type signalfd, @function
+ .globl signalfd
+ .align 4
+
+signalfd:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(3 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_signalfd_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_signalfd_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_signalfd
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/stime.S b/libc/arch-sh/syscalls/stime.S
new file mode 100644
index 0000000..687cdff
--- /dev/null
+++ b/libc/arch-sh/syscalls/stime.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type stime, @function
+ .globl stime
+ .align 4
+
+stime:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(1 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_stime_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_stime_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_stime
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/swapoff.S b/libc/arch-sh/syscalls/swapoff.S
new file mode 100644
index 0000000..be980c6
--- /dev/null
+++ b/libc/arch-sh/syscalls/swapoff.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapoff, @function
+ .globl swapoff
+ .align 4
+
+swapoff:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(1 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_swapoff_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_swapoff_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_swapoff
+1: .long __set_syscall_errno
diff --git a/libc/arch-sh/syscalls/swapon.S b/libc/arch-sh/syscalls/swapon.S
new file mode 100644
index 0000000..7c2e1fc
--- /dev/null
+++ b/libc/arch-sh/syscalls/swapon.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapon, @function
+ .globl swapon
+ .align 4
+
+swapon:
+
+ /* invoke trap */
+ mov.l 0f, r3 /* trap num */
+ trapa #(2 + 0x10)
+
+ /* check return value */
+ cmp/pz r0
+ bt __NR_swapon_end
+
+ /* keep error number */
+ sts.l pr, @-r15
+ mov.l 1f, r1
+ jsr @r1
+ mov r0, r4
+ lds.l @r15+, pr
+
+__NR_swapon_end:
+ rts
+ nop
+
+ .align 2
+0: .long __NR_swapon
+1: .long __set_syscall_errno
diff --git a/libc/arch-x86/syscalls.mk b/libc/arch-x86/syscalls.mk
index 420a91e..5a8daf9 100644
--- a/libc/arch-x86/syscalls.mk
+++ b/libc/arch-x86/syscalls.mk
@@ -126,6 +126,7 @@ syscall_src += arch-x86/syscalls/__timer_gettime.S
syscall_src += arch-x86/syscalls/__timer_getoverrun.S
syscall_src += arch-x86/syscalls/__timer_delete.S
syscall_src += arch-x86/syscalls/utimes.S
+syscall_src += arch-x86/syscalls/adjtimex.S
syscall_src += arch-x86/syscalls/sigaction.S
syscall_src += arch-x86/syscalls/sigprocmask.S
syscall_src += arch-x86/syscalls/__sigsuspend.S
@@ -176,3 +177,7 @@ syscall_src += arch-x86/syscalls/inotify_add_watch.S
syscall_src += arch-x86/syscalls/inotify_rm_watch.S
syscall_src += arch-x86/syscalls/poll.S
syscall_src += arch-x86/syscalls/eventfd.S
+syscall_src += arch-x86/syscalls/stime.S
+syscall_src += arch-x86/syscalls/swapon.S
+syscall_src += arch-x86/syscalls/swapoff.S
+syscall_src += arch-x86/syscalls/getsid.S
diff --git a/libc/arch-x86/syscalls/adjtimex.S b/libc/arch-x86/syscalls/adjtimex.S
new file mode 100644
index 0000000..b212606
--- /dev/null
+++ b/libc/arch-x86/syscalls/adjtimex.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type adjtimex, @function
+ .globl adjtimex
+ .align 4
+
+adjtimex:
+ pushl %ebx
+ mov 8(%esp), %ebx
+ movl $__NR_adjtimex, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ebx
+ ret
diff --git a/libc/arch-x86/syscalls/getsid.S b/libc/arch-x86/syscalls/getsid.S
new file mode 100644
index 0000000..7046b9a
--- /dev/null
+++ b/libc/arch-x86/syscalls/getsid.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type getsid, @function
+ .globl getsid
+ .align 4
+
+getsid:
+ pushl %ebx
+ mov 8(%esp), %ebx
+ movl $__NR_getsid, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ebx
+ ret
diff --git a/libc/arch-x86/syscalls/stime.S b/libc/arch-x86/syscalls/stime.S
new file mode 100644
index 0000000..609aed3
--- /dev/null
+++ b/libc/arch-x86/syscalls/stime.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type stime, @function
+ .globl stime
+ .align 4
+
+stime:
+ pushl %ebx
+ mov 8(%esp), %ebx
+ movl $__NR_stime, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ebx
+ ret
diff --git a/libc/arch-x86/syscalls/swapoff.S b/libc/arch-x86/syscalls/swapoff.S
new file mode 100644
index 0000000..6782c3c
--- /dev/null
+++ b/libc/arch-x86/syscalls/swapoff.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapoff, @function
+ .globl swapoff
+ .align 4
+
+swapoff:
+ pushl %ebx
+ mov 8(%esp), %ebx
+ movl $__NR_swapoff, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ebx
+ ret
diff --git a/libc/arch-x86/syscalls/swapon.S b/libc/arch-x86/syscalls/swapon.S
new file mode 100644
index 0000000..f33af28
--- /dev/null
+++ b/libc/arch-x86/syscalls/swapon.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type swapon, @function
+ .globl swapon
+ .align 4
+
+swapon:
+ pushl %ebx
+ pushl %ecx
+ mov 12(%esp), %ebx
+ mov 16(%esp), %ecx
+ movl $__NR_swapon, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ecx
+ popl %ebx
+ ret
diff --git a/libc/include/mntent.h b/libc/include/mntent.h
index b83da1f..d45e694 100644
--- a/libc/include/mntent.h
+++ b/libc/include/mntent.h
@@ -28,6 +28,7 @@
#ifndef _MNTENT_H_
#define _MNTENT_H_
+#include <sys/cdefs.h>
#include <stdio.h>
#define MNTTYPE_IGNORE "ignore"
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index 9702a7a..cb214fa 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -105,6 +105,7 @@
#define __NR_nanosleep (__NR_SYSCALL_BASE + 162)
#define __NR_getitimer (__NR_SYSCALL_BASE + 105)
#define __NR_setitimer (__NR_SYSCALL_BASE + 104)
+#define __NR_adjtimex (__NR_SYSCALL_BASE + 124)
#define __NR_sigaction (__NR_SYSCALL_BASE + 67)
#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126)
#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72)
@@ -131,6 +132,10 @@
#define __NR_sysinfo (__NR_SYSCALL_BASE + 116)
#define __NR_futex (__NR_SYSCALL_BASE + 240)
#define __NR_poll (__NR_SYSCALL_BASE + 168)
+#define __NR_stime (__NR_SYSCALL_BASE + 25)
+#define __NR_swapon (__NR_SYSCALL_BASE + 87)
+#define __NR_swapoff (__NR_SYSCALL_BASE + 115)
+#define __NR_getsid (__NR_SYSCALL_BASE + 147)
#ifdef __arm__
#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
diff --git a/libc/include/sys/linux-unistd.h b/libc/include/sys/linux-unistd.h
index 23853da..2c11db3 100644
--- a/libc/include/sys/linux-unistd.h
+++ b/libc/include/sys/linux-unistd.h
@@ -137,6 +137,7 @@ int __timer_gettime (timer_t, struct itimerspec*);
int __timer_getoverrun (timer_t);
int __timer_delete (timer_t);
int utimes (const char*, const struct timeval tvp[2]);
+int adjtimex (struct timex *);
int sigaction (int, const struct sigaction *, struct sigaction *);
int sigprocmask (int, const sigset_t *, sigset_t *);
int __sigsuspend (int unused1, int unused2, unsigned mask);
@@ -205,6 +206,10 @@ int poll (struct pollfd *, unsigned int, long);
int eventfd (unsigned int, int);
int __set_tls (void*);
int cacheflush (long start, long end, long flags);
+int stime (time_t *);
+int swapon (const char *, int);
+int swapoff (const char *);
+pid_t getsid (pid_t pid);
#ifdef __cplusplus
}
#endif
diff --git a/libc/tools/checksyscalls.py b/libc/tools/checksyscalls.py
index 9edb390..f6182f3 100755
--- a/libc/tools/checksyscalls.py
+++ b/libc/tools/checksyscalls.py
@@ -132,10 +132,10 @@ if not os.path.exists(arm_unistd):
# with two distinct unistd_32.h and unistd_64.h definition files.
# take care of this here
#
-x86_unistd = linux_root + "/include/asm-i386/unistd.h"
+x86_unistd = linux_root + "/include/asm-i386/unistd_32.h"
if not os.path.exists(x86_unistd):
x86_unistd1 = x86_unistd
- x86_unistd = linux_root + "/include/asm-x86/unistd_32.h"
+ x86_unistd = linux_root + "/include/asm-x86/unistd.h"
if not os.path.exists(x86_unistd):
print "WEIRD: could not locate the i386/x86 unistd.h header file"
print "tried searching in '%s' and '%s'" % (x86_unistd1, x86_unistd)