diff --git a/components/lwip/lwip/src/include/lwip/sockets.h b/components/lwip/lwip/src/include/lwip/sockets.h index 973bea4a..a3ff1d52 100644 --- a/components/lwip/lwip/src/include/lwip/sockets.h +++ b/components/lwip/lwip/src/include/lwip/sockets.h @@ -580,9 +580,15 @@ int lwip_fcntl(int s, int cmd, int val); /** @ingroup socket */ #define close(s) lwip_close(s) /** @ingroup socket */ -#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val) + +/* Disable here to use stand APIs */ +//#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val) /** @ingroup socket */ -#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp) +//#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp) + +int ioctl(int fd, int request, ...); +int fcntl(int fd, int request, ...); + #endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ #endif /* LWIP_COMPAT_SOCKETS != 2 */ diff --git a/components/lwip/lwip/src/include/posix/sys/socket.h b/components/lwip/lwip/src/include/posix/sys/socket.h index 950464da..03bfd499 100644 --- a/components/lwip/lwip/src/include/posix/sys/socket.h +++ b/components/lwip/lwip/src/include/posix/sys/socket.h @@ -33,8 +33,3 @@ #include "sdkconfig.h" #include "lwip/sockets.h" - -#ifdef CONFIG_USING_ESP_VFS -#include -#include -#endif diff --git a/components/newlib/newlib/include/fcntl.h b/components/newlib/newlib/include/fcntl.h index 1f20eef4..103533fc 100644 --- a/components/newlib/newlib/include/fcntl.h +++ b/components/newlib/newlib/include/fcntl.h @@ -1,7 +1,4 @@ #pragma once -#include -#undef fcntl - #include diff --git a/components/vfs/port/fcntl.c b/components/vfs/port/fcntl.c index af6692a5..a476853e 100644 --- a/components/vfs/port/fcntl.c +++ b/components/vfs/port/fcntl.c @@ -19,6 +19,8 @@ #include #include +#include "lwip/sockets.h" + int fcntl(int fd, int request, ...) { int val, ret;