Split this out into a "cpu/sockbits.h" file now,
like we ought to do for all of the other targets.
Signed-off-by: Richard Henderson <[email protected]>
Translate the SO_PASSSEC option to setsockopt to the host value &
perform the syscall as expected, allowing use of the option by target
programs.
Signed-off-by: Paul Burton <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
Previous implementation has failed to take into account different value of
SOCK_NONBLOCK on target and host, and existence of SOCK_CLOEXEC.
The same conversion has to be applied both for do_socket and do_socketpair,
so the code has been isolated in a static inline function.
enum sock_type in linux-user/socket.h has been extended to include
TARGET_SOCK_CLOEXEC and TARGET_SOCK_NONBLOCK, similar to definition in libc.
The patch also includes necessary code style changes (tab to spaces) in the
header file since most of the file has been touched by this change.
Signed-off-by: Petar Jovanovic <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>