Browse Source

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
Joel Cunningham 8 years ago
parent
commit
6cdfae1245
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/include/lwip/sockets.h

+ 3 - 1
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 */