diff options
Diffstat (limited to 'components/net/sal')
| -rw-r--r-- | components/net/sal/Kconfig | 5 | ||||
| -rw-r--r-- | components/net/sal/impl/af_inet_lwip.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/components/net/sal/Kconfig b/components/net/sal/Kconfig index e5395a6631..0197ae544e 100644 --- a/components/net/sal/Kconfig +++ b/components/net/sal/Kconfig @@ -34,6 +34,11 @@ if RT_USING_SAL Enable BSD socket operated by file system API Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs. + config SAL_USING_AF_UNIX + bool "Enable support AF_UNIX socket" + default n + default y if RT_USING_SMART + config SAL_SOCKETS_NUM int "the maximum number of sockets" depends on !SAL_USING_POSIX diff --git a/components/net/sal/impl/af_inet_lwip.c b/components/net/sal/impl/af_inet_lwip.c index 401b9001e4..52c1c2cb7d 100644 --- a/components/net/sal/impl/af_inet_lwip.c +++ b/components/net/sal/impl/af_inet_lwip.c @@ -225,11 +225,17 @@ static int inet_getsockname(int socket, struct sockaddr *name, socklen_t *namele int inet_ioctlsocket(int socket, long cmd, void *arg) { + int flags; + switch (cmd) { case F_GETFL: case F_SETFL: - return lwip_fcntl(socket, cmd, (int)(size_t)arg); + flags = (int)(size_t)arg; +#ifdef O_LARGEFILE + flags &= ~O_LARGEFILE; +#endif + return lwip_fcntl(socket, cmd, flags); default: return lwip_ioctl(socket, cmd, arg); |
