summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-01-09 18:22:09 +0000
committerdchagin <dchagin@FreeBSD.org>2016-01-09 18:22:09 +0000
commit3fca4fe8523b16d9f47fd7eeb14581f9ce96d00e (patch)
treeb41ee3ddfc7453bd002d43ac6916fec7649abe1b /sys/compat
parentd1e4a825ff80ebcf1d5650ac9ec87e31ebbdf8ac (diff)
downloadFreeBSD-src-3fca4fe8523b16d9f47fd7eeb14581f9ce96d00e.zip
FreeBSD-src-3fca4fe8523b16d9f47fd7eeb14581f9ce96d00e.tar.gz
MFC r284166 (by jkim):
Properly initialize flags for accept4(2) not to return spurious EINVAL. Note this fixes a Linuxulator regression introduced in r283490. PR: 200662
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index ef3b2c1..34af9da 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -787,6 +787,7 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
/* XXX: */
bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr);
bsd_args.anamelen = PTRIN(namelen);/* XXX */
+ bsd_args.flags = 0;
error = linux_set_socket_flags(flags, &bsd_args.flags);
if (error != 0)
return (error);
OpenPOWER on IntegriCloud