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_socket.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_socket.h')
| -rw-r--r-- | sys/compat/linux/linux_socket.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 4020654e0cf..cebd5096604 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_socket.h,v 1.11 2012/06/26 10:18:08 pirofti Exp $ */ +/* $OpenBSD: linux_socket.h,v 1.12 2015/01/19 23:30:20 guenther Exp $ */ /* $NetBSD: linux_socket.h,v 1.3 1995/05/28 10:16:34 mycroft Exp $ */ /* @@ -39,8 +39,8 @@ * Various Linux socket defines. Everything that is not re-defined here * is the same as in OpenBSD. * - * COMPAT_43 is assumed, and the osockaddr struct is used (it is what - * Linux uses) + * Linux uses the old-style sockaddr, called linux_sockaddr here, + * without sa_len member. linux_sa_{get,put}() handle mapping from/to that. */ /* @@ -89,7 +89,7 @@ #define LINUX_SO_LINGER 13 /* - * Options vor [gs]etsockopt(2), IP level. + * Options for [gs]etsockopt(2), IP level. */ #define LINUX_IP_TOS 1 |
