net: sockets: Add fcntl to socket offloading API

Offload fcntl calls through socket offloading API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2019-01-17 14:55:05 +01:00 committed by Jukka Rissanen
commit 0b93c68f79
4 changed files with 29 additions and 0 deletions

View file

@ -19,3 +19,18 @@ void socket_offload_register(const struct socket_offload *ops)
socket_ops = ops;
}
int fcntl(int fd, int cmd, ...)
{
__ASSERT_NO_MSG(socket_ops);
__ASSERT_NO_MSG(socket_ops->fcntl);
va_list args;
int res;
va_start(args, cmd);
res = socket_ops->fcntl(fd, cmd, args);
va_end(args);
return res;
}