net: sockets: move fcntl back to socket_offload.c
We are reverting the changes in commit
55b3f05932
given build errors are seen
when fcntl.h is included, as it declares fcntl() as a non-static
function. The same function cannot be declared as both static and
non-static.
Instead, we avoid redefining fcntl() in lib/os/fdtable.c specifically
for case of the SimpleLink family, til we have support for the new
socket_op_vtable.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
parent
1a98d4d1fe
commit
3609e261bb
3 changed files with 24 additions and 14 deletions
|
@ -20,3 +20,19 @@ void socket_offload_register(const struct socket_offload *ops)
|
|||
socket_ops = ops;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOC_FAMILY_TISIMPLELINK
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue