mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-03 19:49:09 +08:00
feat(lwip): Fix LWIP socket mt header file warning
This commit is contained in:
@ -35,7 +35,6 @@
|
||||
|
||||
#include "posix/sys/socket.h"
|
||||
|
||||
#if LWIP_COMPAT_SOCKETS == 3
|
||||
int lwip_mt_init(void);
|
||||
int lwip_socket_mt(int domain, int type, int protocol);
|
||||
int lwip_bind_mt(int s, const struct sockaddr *name, socklen_t namelen);
|
||||
@ -60,22 +59,23 @@ int lwip_close_mt(int s);
|
||||
int lwip_select_mt(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout);
|
||||
int lwip_fcntl_mt(int s, int cmd, int val);
|
||||
|
||||
#define accept(a,b,c) lwip_accept_mt(a,b,c)
|
||||
#define bind(a,b,c) lwip_bind_mt(a,b,c)
|
||||
#define shutdown(a,b) lwip_shutdown_mt(a,b)
|
||||
#define connect(a,b,c) lwip_connect_mt(a,b,c)
|
||||
#define getsockname(a,b,c) lwip_getsockname_mt(a,b,c)
|
||||
#define getpeername(a,b,c) lwip_getpeername_mt(a,b,c)
|
||||
#define setsockopt(a,b,c,d,e) lwip_setsockopt_mt(a,b,c,d,e)
|
||||
#define getsockopt(a,b,c,d,e) lwip_getsockopt_mt(a,b,c,d,e)
|
||||
#define listen(a,b) lwip_listen_mt(a,b)
|
||||
#define recv(a,b,c,d) lwip_recv_mt(a,b,c,d)
|
||||
#define recvfrom(a,b,c,d,e,f) lwip_recvfrom_mt(a,b,c,d,e,f)
|
||||
#define send(a,b,c,d) lwip_send_mt(a,b,c,d)
|
||||
#define sendto(a,b,c,d,e,f) lwip_sendto_mt(a,b,c,d,e,f)
|
||||
#define socket(a,b,c) lwip_socket_mt(a,b,c)
|
||||
#define select(a,b,c,d,e) lwip_select_mt(a,b,c,d,e)
|
||||
#define ioctlsocket(a,b,c) lwip_ioctl_mt(a,b,c)
|
||||
#undef accept
|
||||
#undef bind
|
||||
#undef shutdown
|
||||
#undef connect
|
||||
#undef getsockname
|
||||
#undef getpeername
|
||||
#undef setsockopt
|
||||
#undef getsockopt
|
||||
#undef listen
|
||||
#undef recv
|
||||
#undef recvfrom
|
||||
#undef send
|
||||
#undef sendto
|
||||
#undef socket
|
||||
#undef select
|
||||
#undef ioctlsocket
|
||||
#undef sendmsg
|
||||
|
||||
#define accept(a,b,c) lwip_accept_mt(a,b,c)
|
||||
#define bind(a,b,c) lwip_bind_mt(a,b,c)
|
||||
@ -95,11 +95,18 @@ int lwip_fcntl_mt(int s, int cmd, int val);
|
||||
#define ioctlsocket(a,b,c) lwip_ioctl_mt(a,b,c)
|
||||
|
||||
#if LWIP_POSIX_SOCKETS_IO_NAMES
|
||||
#undef read
|
||||
#undef write
|
||||
#undef close
|
||||
#undef fcntl
|
||||
#undef writev
|
||||
#undef closesocket
|
||||
#undef ioctl
|
||||
|
||||
#define read(a,b,c) lwip_read_mt(a,b,c)
|
||||
#define write(a,b,c) lwip_write_mt(a,b,c)
|
||||
#define close(s) lwip_close_mt(s)
|
||||
#define fcntl(a,b,c) lwip_fcntl_mt(a,b,c)
|
||||
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
||||
#endif /* LWIP_COMPAT_SOCKETS */
|
||||
|
||||
#endif /* _SOCKET_H_ */
|
||||
|
@ -1351,7 +1351,7 @@
|
||||
* While this helps code completion, it might conflict with existing libraries.
|
||||
* (only used if you use sockets.c)
|
||||
*/
|
||||
#define LWIP_COMPAT_SOCKETS 3
|
||||
#define LWIP_COMPAT_SOCKETS 1
|
||||
|
||||
/**
|
||||
* LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
|
||||
|
Reference in New Issue
Block a user