From: Rich Felker Date: Mon, 10 Dec 2012 21:40:45 +0000 (-0500) Subject: syscall() declaration belongs in unistd.h, not sys/syscall.h X-Git-Tag: v0.9.9~64 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=baf246e559e915a78a9703e10d15020c7edee423;p=oweals%2Fmusl.git syscall() declaration belongs in unistd.h, not sys/syscall.h traditionally, both BSD and GNU systems have it this way. sys/syscall.h is purely syscall number macros. presently glibc exposes the syscall declaration in unistd.h only with _GNU_SOURCE, but that does not reflect historical practice. --- diff --git a/include/sys/syscall.h b/include/sys/syscall.h index af3ca466..24987ddf 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -1,16 +1,6 @@ #ifndef _SYS_SYSCALL_H #define _SYS_SYSCALL_H -#ifdef __cplusplus -extern "C" { -#endif - -#include - -long syscall(long, ...); #include -#ifdef __cplusplus -} -#endif #endif diff --git a/include/unistd.h b/include/unistd.h index 64a6b461..89015ad6 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -175,6 +175,7 @@ void setusershell(void); void endusershell(void); char *getusershell(void); int acct(const char *); +long syscall(long, ...); #endif #ifdef _GNU_SOURCE