aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-09-03 15:30:21 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-09-03 15:30:21 +0000
commit1f15a28a917d53fd971e05c9576f7da35ab92e2d (patch)
tree63ba1adc3989651f27fcafced45b3ae7b782a2fd /sys/compat/linux
parent3aabf91be8846b6ec4c0236c2b9d9a9270e9870d (diff)
Notes
Diffstat (limited to 'sys/compat/linux')
-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);
}