From 66c5ec6ed8e5ee72ebdf8f639b1b795a21fec37a Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 17 Sep 2015 00:35:57 +0200 Subject: [PATCH] kernel/dup: Correct dup{,2}()'s fd params to int in the syscall glue. --- sys/kern/syscalls.master | 4 ++-- sys/sys/sysproto.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 72423741f7..d05d1ef81d 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -93,7 +93,7 @@ 38 COMPAT { int stat(char *path, struct ostat *ub); } 39 STD { pid_t getppid(void); } 40 COMPAT { int lstat(char *path, struct ostat *ub); } -41 STD { int dup(u_int fd); } +41 STD { int dup(int fd); } 42 STD { int pipe(void); } 43 STD { gid_t getegid(void); } 44 STD { int profil(caddr_t samples, size_t size, \ @@ -154,7 +154,7 @@ 88 COMPAT { int sethostname(char *hostname, u_int len); } \ sethostname sethostname_args int 89 STD { int getdtablesize(void); } -90 STD { int dup2(u_int from, u_int to); } +90 STD { int dup2(int from, int to); } 91 UNIMPL getdopt 92 STD { int fcntl(int fd, int cmd, long arg); } ; XXX should be { int fcntl(int fd, int cmd, ...); } diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 685047d386..1864e382c8 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -290,7 +290,7 @@ struct dup_args { #ifdef _KERNEL struct sysmsg sysmsg; #endif - u_int fd; char fd_[PAD_(u_int)]; + int fd; char fd_[PAD_(int)]; }; struct pipe_args { #ifdef _KERNEL @@ -536,8 +536,8 @@ struct dup2_args { #ifdef _KERNEL struct sysmsg sysmsg; #endif - u_int from; char from_[PAD_(u_int)]; - u_int to; char to_[PAD_(u_int)]; + int from; char from_[PAD_(int)]; + int to; char to_[PAD_(int)]; }; struct fcntl_args { #ifdef _KERNEL -- 2.11.4.GIT