From 43dc903ebfb710ea2e7844859d9c722b81e71799 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 26 Feb 2001 04:16:01 +0000 Subject: 2001-02-25 Roland McGrath * symlink.c: Include for decls of built-ins. * firmlink.c: Include for exit decl. * ifsock.c: Likewise. * null.c: Likewise. * magic.c: Likewise. * fifo.c: Likewise. * hello.c: Likewise. * hello-mt.c: Likewise. --- trans/ifsock.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'trans/ifsock.c') diff --git a/trans/ifsock.c b/trans/ifsock.c index 15fb7df3..319db6b3 100644 --- a/trans/ifsock.c +++ b/trans/ifsock.c @@ -1,5 +1,5 @@ /* Server for S_IFSOCK nodes - Copyright (C) 1994, 1995 Free Software Foundation + Copyright (C) 1994, 1995, 2001 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -72,7 +73,7 @@ main (int argc, char **argv) task_get_bootstrap_port (mach_task_self (), &bootstrap); if (bootstrap == MACH_PORT_NULL) error(1, 0, "Must be started as a translator"); - + /* Reply to our parent */ err = trivfs_startup (bootstrap, 0, control_class, port_bucket, node_class, port_bucket, NULL); @@ -115,18 +116,18 @@ error_t S_ifsock_getsockaddr (file_t sockfile, mach_port_t *address) { - struct trivfs_protid *cred = ports_lookup_port (port_bucket, sockfile, + struct trivfs_protid *cred = ports_lookup_port (port_bucket, sockfile, node_class); int perms; error_t err; - + if (!cred) return EOPNOTSUPP; - + err = file_check_access (cred->realnode, &perms); if (!err && !(perms & O_READ)) err = EACCES; - + if (!err) *address = address_port; ports_port_deref (cred); -- cgit v1.2.3