From 6cdfae124552d6ffb8b647d2391c71905d752437 Mon Sep 17 00:00:00 2001 From: Joel Cunningham Date: Thu, 21 Sep 2017 11:04:37 -0500 Subject: [PATCH] sockets: cleanup ioctlsocket for LWIP_COMPAT_SOCKETS == 2 (patch #9456) This makes two cleanups that follows the same organization as close/closesocket: 1) There is no lwip_ioctlsocket. Instead lwip_ioctl should redirect to ioctlsocket 2) With LWIP_POSIX_SOCKETS_IO_NAMES enabled, lwip_ioctl/ioctlsocket should redirect to ioctl --- src/include/lwip/sockets.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h index 71c36b63..07d15eca 100644 --- a/src/include/lwip/sockets.h +++ b/src/include/lwip/sockets.h @@ -545,7 +545,7 @@ void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destro #if LWIP_SOCKET_POLL #define lwip_poll poll #endif -#define lwip_ioctlsocket ioctl +#define lwip_ioctl ioctlsocket #define lwip_inet_ntop inet_ntop #define lwip_inet_pton inet_pton @@ -558,7 +558,9 @@ void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destro #define lwip_close close #define closesocket(s) close(s) int fcntl(int s, int cmd, ...); +#undef lwip_ioctl #define lwip_ioctl ioctl +#define ioctlsocket ioctl #endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ #endif /* LWIP_COMPAT_SOCKETS == 2 */