diff --git a/components/net/lwip-2.1/porting/include/lwip/lwipopts.h b/components/net/lwip-2.1/porting/include/lwip/lwipopts.h index 1f1ac3c0..535da98f 100644 --- a/components/net/lwip-2.1/porting/include/lwip/lwipopts.h +++ b/components/net/lwip-2.1/porting/include/lwip/lwipopts.h @@ -240,4 +240,7 @@ #define LWIP_SOCKET_OFFSET CONFIG_NFILE_DESCRIPTORS #endif +#define LWIP_SOCKET_IOCTL 0 +#define LWIP_SOCKET_FCNTL 0 + #endif /* _LWIP_PORTING_LWIPOPTS_H_ */ diff --git a/components/net/lwip-2.1/porting/src/sockets_porting.c b/components/net/lwip-2.1/porting/src/sockets_porting.c index 7348e09b..7a883d91 100644 --- a/components/net/lwip-2.1/porting/src/sockets_porting.c +++ b/components/net/lwip-2.1/porting/src/sockets_porting.c @@ -211,6 +211,7 @@ int close(int fd) } #endif +#if LWIP_SOCKET_IOCTL #ifdef LWIP_SOCKET_IOCTL_FUNC int ioctl(int fd, int req, ...) { @@ -222,7 +223,9 @@ int ioctl(int fd, int req, ...) return lwip_ioctl(fd, (long)req, (void *)arg); } #endif +#endif +#if LWIP_SOCKET_FCNTL #ifdef LWIP_SOCKET_FCNTL_FUNC int fcntl(int fd, int cmd, ...) { @@ -234,6 +237,7 @@ int fcntl(int fd, int cmd, ...) return lwip_fcntl(fd, cmd, val); } #endif +#endif #if LWIP_SOCKET_SELECT #ifdef LWIP_SOCKET_SELECT_FUNC