From de24f1ac00924b9a523d06784867bc8c9312335d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 18 Jul 2014 15:55:41 -0700 Subject: [PATCH] Clean up some misinformation around prctl. prctl shouldn't be in . (cherry picked from commit 9c07aee83b4ebbf2dba8e23d6896683187b9724e) Change-Id: I70cda886fbf4d58d82dc70adaa981506ebff9949 --- libc/SYSCALLS.TXT | 4 +--- libc/include/sys/prctl.h | 10 +++------- libc/include/unistd.h | 3 --- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT index 7ae054e78..014d55444 100644 --- a/libc/SYSCALLS.TXT +++ b/libc/SYSCALLS.TXT @@ -80,9 +80,7 @@ int setpgid(pid_t, pid_t) all int setregid:setregid32(gid_t, gid_t) arm,x86 int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64 int chroot(const char*) all -# IMPORTANT: Even though declares prctl(int, ...), the syscall stub must take 6 arguments -# to match the kernel implementation. -int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) all +int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all long __arch_prctl:arch_prctl(int, unsigned long) x86_64 int capget(cap_user_header_t header, cap_user_data_t data) all int capset(cap_user_header_t header, const cap_user_data_t data) all diff --git a/libc/include/sys/prctl.h b/libc/include/sys/prctl.h index 8c6167744..d96b8b6e5 100644 --- a/libc/include/sys/prctl.h +++ b/libc/include/sys/prctl.h @@ -25,20 +25,16 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H -#include #include +#include + __BEGIN_DECLS -/* IMPORTANT NOTE: This function is declared as taking a variable number - * of arguments to match the GLibc definition. However - * its declaration inside SYSCALLS.TXT *must* make it - * take 6 arguments to ensure consistency with the kernel - * implementation. - */ extern int prctl(int option, ...); __END_DECLS diff --git a/libc/include/unistd.h b/libc/include/unistd.h index afe5f1a3f..12e625743 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -71,9 +71,6 @@ extern int execl(const char *, const char *, ...); extern int execlp(const char *, const char *, ...); extern int execle(const char *, const char *, ...); -/* IMPORTANT: See comment under about this declaration */ -extern int prctl(int option, ...); - extern int nice(int); extern int setuid(uid_t);