diff --git a/net/usrsock/usrsock_ioctl.c b/net/usrsock/usrsock_ioctl.c index 66bf83242e..91b252aaad 100644 --- a/net/usrsock/usrsock_ioctl.c +++ b/net/usrsock/usrsock_ioctl.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -173,6 +174,15 @@ int usrsock_ioctl(FAR struct socket *psock, int cmd, FAR void *arg, int ret; + /* Bypass FIONBIO to socket level, + * since the usrsock server always put the socket in nonblocking mode. + */ + + if (cmd == FIONBIO) + { + return -ENOTTY; + } + net_lock(); if (conn->state == USRSOCK_CONN_STATE_UNINITIALIZED ||