diff options
| author | 2015-01-19 23:30:20 +0000 | |
|---|---|---|
| committer | 2015-01-19 23:30:20 +0000 | |
| commit | fa8d6f6f61f2496c212ea10de996bbc6f119dae4 (patch) | |
| tree | d3bff7c3ee9df2e51788cef403658b02c8184da4 /sys/compat/linux/linux_socketcall.h | |
| parent | back it out properly (diff) | |
| download | wireguard-openbsd-fa8d6f6f61f2496c212ea10de996bbc6f119dae4.tar.xz wireguard-openbsd-fa8d6f6f61f2496c212ea10de996bbc6f119dae4.zip | |
Prefer linux_sockaddr over osockaddr, so the latter can go away.
sys_socket() supports SOCK_{CLOEXEC,NONBLOCK} now, so build on that.
doaccept() supports the non-inheriting-of-O_NONBLOCK, so build on that.
Merge compat_sys_{accept,send,recv}() into their only callers.
Lie a little and use struct sockaddr in the linux socket syscall args when
it's a return argument to avoid a bunch a casts.
Delete many other unnecessary sockaddr casts
verified with a curl Linux binary
Diffstat (limited to 'sys/compat/linux/linux_socketcall.h')
| -rw-r--r-- | sys/compat/linux/linux_socketcall.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux/linux_socketcall.h b/sys/compat/linux/linux_socketcall.h index 57c4709b420..144e6c29448 100644 --- a/sys/compat/linux/linux_socketcall.h +++ b/sys/compat/linux/linux_socketcall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_socketcall.h,v 1.5 2011/04/05 22:54:31 pirofti Exp $ */ +/* $OpenBSD: linux_socketcall.h,v 1.6 2015/01/19 23:30:20 guenther Exp $ */ /* $NetBSD: linux_socketcall.h,v 1.1 1995/02/28 23:26:05 fvdl Exp $ */ /* @@ -69,13 +69,13 @@ struct linux_socket_args { struct linux_bind_args { int s; - struct osockaddr *name; + struct linux_sockaddr *name; int namelen; }; struct linux_connect_args { int s; - struct osockaddr *name; + struct linux_sockaddr *name; int namelen; }; @@ -92,7 +92,7 @@ struct linux_accept_args { struct linux_getsockname_args { int s; - struct osockaddr *addr; + struct sockaddr *addr; int *namelen; }; @@ -128,7 +128,7 @@ struct linux_sendto_args { void *msg; int len; int flags; - struct osockaddr *to; + struct linux_sockaddr *to; int tolen; }; @@ -137,7 +137,7 @@ struct linux_recvfrom_args { void *buf; int len; int flags; - struct osockaddr *from; + struct sockaddr *from; int *fromlen; }; |
