Clean up some misinformation around prctl.
prctl shouldn't be in <unistd.h>.
(cherry picked from commit 9c07aee83b4ebbf2dba8e23d6896683187b9724e)
Change-Id: I70cda886fbf4d58d82dc70adaa981506ebff9949
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 7ae054e..014d554 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -80,9 +80,7 @@
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 <sys/prctl.h> 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 8c61677..d96b8b6 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 <linux/prctl.h>
#include <sys/cdefs.h>
+#include <linux/prctl.h>
+
__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 afe5f1a..12e6257 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -71,9 +71,6 @@
extern int execlp(const char *, const char *, ...);
extern int execle(const char *, const char *, ...);
-/* IMPORTANT: See comment under <sys/prctl.h> about this declaration */
-extern int prctl(int option, ...);
-
extern int nice(int);
extern int setuid(uid_t);