@@ -69,8 +69,9 @@ __extern int fstatat(int, const char *, struct stat *, int);
__extern int lstat(const char *, struct stat *);
__extern mode_t umask(mode_t);
__extern int mknod(const char *, mode_t, dev_t);
-__extern int mknodat(int, const char *, const char *, mode_t, dev_t);
+__extern int mknodat(int, const char *, mode_t, dev_t);
__extern int mkfifo(const char *, mode_t);
+__extern int utimensat(int, const char *, const struct timespec *, int);
__extern_inline int mkfifo(const char *__p, mode_t __m)
{
@@ -61,7 +61,7 @@ __extern int setfsuid(uid_t);
__extern int access(const char *, int);
__extern int faccessat(int, const char *, int, int);
__extern int link(const char *, const char *);
-__extern int linkat(int, const char *, int, const char *);
+__extern int linkat(int, const char *, int, const char *, int);
__extern int unlink(const char *);
__extern int unlinkat(int, const char *, int);
__extern int chdir(const char *);
@@ -70,19 +70,20 @@ __extern int chmod(const char *, mode_t);
__extern int fchmod(int, mode_t);
__extern int fchmodat(int, const char *, mode_t);
__extern int mkdir(const char *, mode_t);
-__extern int mkdirat(int, const char *, const char *, mode_t);
+__extern int mkdirat(int, const char *, mode_t);
__extern int rmdir(const char *);
__extern int pipe(int *);
__extern int pipe2(int *, int);
__extern int chroot(const char *);
__extern int symlink(const char *, const char *);
-__extern int symlinkat(int, const char *, const char *);
+__extern int symlinkat(const char *, int, const char *);
__extern int readlink(const char *, char *, size_t);
__extern int readlinkat(int, const char *, char *, size_t);
__extern int chown(const char *, uid_t, gid_t);
__extern int fchown(int, uid_t, gid_t);
__extern int lchown(const char *, uid_t, gid_t);
__extern char *getcwd(char *, size_t);
+__extern int fchownat(int, const char *, uid_t, gid_t, int);
/* Also in <fcntl.h> */
#ifndef _KLIBC_IN_OPEN_C
@@ -109,7 +109,7 @@ int swapoff(const char *);
int access(const char *, int);
int faccessat(int, const char *, int, int);
int link(const char *, const char *);
-<?> int linkat(int, const char *, int, const char *);
+<?> int linkat(int, const char *, int, const char *, int);
int unlink(const char *);
<?> int unlinkat(int, const char *, int);
int chdir(const char *);
@@ -117,12 +117,12 @@ int fchdir(int);
int rename(const char *, const char *);
<?> int renameat(int, const char *, int, const char *);
int mknod(const char *, mode_t, dev_t);
-<?> int mknodat(int, const char *, const char *, mode_t, dev_t);
+<?> int mknodat(int, const char *, mode_t, dev_t);
int chmod(const char *, mode_t);
int fchmod(int, mode_t);
<?> int fchmodat(int, const char *, mode_t);
int mkdir(const char *, mode_t);
-<?> int mkdirat(int, const char *, const char *, mode_t);
+<?> int mkdirat(int, const char *, mode_t);
int rmdir(const char *);
<!alpha,ia64,mips,mips64,sh,sparc,sparc64> int pipe(int *);
int pipe2(int *, int);
mknodat and mkdirat contain a spurious repeated parameter, linkat is missing the final int flags parameter, and symlinkat has the first two parameters transposed. Also declarations are missing for utimensat and fchownat. This patch fixes up these syscall declarations. Signed-off-by: Steve Capper <steve.capper@linaro.org> --- usr/include/sys/stat.h | 3 ++- usr/include/unistd.h | 7 ++++--- usr/klibc/SYSCALLS.def | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-)