summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_socket.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-08-24 20:21:21 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-08-24 20:21:21 +0000
commit2ca25ab53ec018a64ecbf89e780fe9ff4298811e (patch)
tree2adb2b3e0072e186b55581dbf999abee2995639a /sys/compat/linux/linux_socket.c
parent1c01d05f9c5f0c93cdae460d2e071217deb008c7 (diff)
Notes
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r--sys/compat/linux/linux_socket.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 47cf5d6f22fd..8233db1744c2 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -674,12 +674,7 @@ linux_accept(struct thread *td, struct linux_accept_args *args)
struct close_args /* {
int fd;
} */ c_args;
- struct fcntl_args /* {
- int fd;
- int cmd;
- long arg;
- } */ f_args;
- int error;
+ int error, fd;
if ((error = copyin(args, &linux_args, sizeof(linux_args))))
return (error);
@@ -705,11 +700,9 @@ linux_accept(struct thread *td, struct linux_accept_args *args)
* accepted one, so we must clear the flags in the new descriptor.
* Ignore any errors, because we already have an open fd.
*/
- f_args.fd = td->td_retval[0];
- f_args.cmd = F_SETFL;
- f_args.arg = 0;
- (void)fcntl(td, &f_args);
- td->td_retval[0] = f_args.fd;
+ fd = td->td_retval[0];
+ (void)kern_fcntl(td, fd, F_SETFL, 0);
+ td->td_retval[0] = fd;
return (0);
}