diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index aa892e3d49fc..f0f27179a124 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -50,7 +50,7 @@ #include struct fileops socketops = - { soo_read, soo_write, soo_ioctl, soo_poll, soo_close }; + { soo_read, soo_write, soo_ioctl, soo_poll, soo_stat, soo_close }; /* ARGSUSED */ int @@ -155,10 +155,12 @@ soo_poll(fp, events, cred, p) } int -soo_stat(so, ub) - register struct socket *so; - register struct stat *ub; +soo_stat(fp, ub, p) + struct file *fp; + struct stat *ub; + struct proc *p; { + struct socket *so = (struct socket *)fp->f_data; bzero((caddr_t)ub, sizeof (*ub)); ub->st_mode = S_IFSOCK; diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 471ddbeecceb..57ddca730544 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -296,7 +296,7 @@ int soo_ioctl __P((struct file *fp, u_long cmd, caddr_t data, struct proc *p)); int soo_poll __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); -int soo_stat __P((struct socket *so, struct stat *ub)); +int soo_stat __P((struct file *fp, struct stat *ub, struct proc *p)); /* * From uipc_socket and friends