diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-14 07:15:34 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-14 07:15:34 +0100 |
commit | 0732183638be852dfb4046f9c81be71d0bb06fe5 (patch) | |
tree | b7dadb6eb3594b4fa7d4ba2ba24032e3b525d926 /freebsd/sys/kern/uipc_syscalls.c | |
parent | if_tsec: Enable FDT support (diff) | |
download | rtems-libbsd-0732183638be852dfb4046f9c81be71d0bb06fe5.tar.bz2 |
Fix SOCK_CLOEXEC with socket() and socketpair()
Remove SOCK_CLOEXEC flag to get a valid socket type, e.g. to avoid a
EPROTOTYPE in case of socket(..., SOCK_DGRAM | SOCK_CLOEXEC, ...).
Diffstat (limited to 'freebsd/sys/kern/uipc_syscalls.c')
-rw-r--r-- | freebsd/sys/kern/uipc_syscalls.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/freebsd/sys/kern/uipc_syscalls.c b/freebsd/sys/kern/uipc_syscalls.c index 2d81fc20..c6fdb26f 100644 --- a/freebsd/sys/kern/uipc_syscalls.c +++ b/freebsd/sys/kern/uipc_syscalls.c @@ -176,12 +176,10 @@ sys_socket(struct thread *td, struct socket_args *uap) type = uap->type; oflag = 0; fflag = 0; -#ifndef __rtems__ if ((type & SOCK_CLOEXEC) != 0) { type &= ~SOCK_CLOEXEC; oflag |= O_CLOEXEC; } -#endif /* __rtems__ */ if ((type & SOCK_NONBLOCK) != 0) { type &= ~SOCK_NONBLOCK; fflag |= FNONBLOCK; @@ -775,12 +773,10 @@ kern_socketpair(struct thread *td, int domain, int type, int protocol, oflag = 0; fflag = 0; -#ifndef __rtems__ if ((type & SOCK_CLOEXEC) != 0) { type &= ~SOCK_CLOEXEC; oflag |= O_CLOEXEC; } -#endif /* __rtems__ */ if ((type & SOCK_NONBLOCK) != 0) { type &= ~SOCK_NONBLOCK; fflag |= FNONBLOCK; |