mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
socketpair: Add SOCK_NONBLOCK support into type field
behavior alignment to Linux Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -150,6 +150,11 @@ int socketpair(int domain, int type, int protocol, int sv[2])
|
||||
oflags |= O_CLOEXEC;
|
||||
}
|
||||
|
||||
if (type & SOCK_NONBLOCK)
|
||||
{
|
||||
oflags |= O_NONBLOCK;
|
||||
}
|
||||
|
||||
/* Allocate a socket descriptor */
|
||||
|
||||
for (; j < 2; j++)
|
||||
|
||||
Reference in New Issue
Block a user