From bb38fa0ee11cd4433e64517cea9a99a7280a3be6 Mon Sep 17 00:00:00 2001 From: dongheng Date: Mon, 17 Jun 2019 20:32:22 +0800 Subject: [PATCH] fix(lwip): fix "unistd.h" I/O APIs not declare when disable VFS When enable VFS, apps code should include "unistd.h", "sys/ioctl.h" or "fcntl.h" if using "read", "write", "close", "ioctl" and "fcntl". --- components/lwip/lwip/src/include/posix/sys/socket.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/lwip/lwip/src/include/posix/sys/socket.h b/components/lwip/lwip/src/include/posix/sys/socket.h index 03bfd499..d6068709 100644 --- a/components/lwip/lwip/src/include/posix/sys/socket.h +++ b/components/lwip/lwip/src/include/posix/sys/socket.h @@ -33,3 +33,9 @@ #include "sdkconfig.h" #include "lwip/sockets.h" + +#if !LWIP_POSIX_SOCKETS_IO_NAMES +#include +#include +#include +#endif /* !LWIP_POSIX_SOCKETS_IO_NAMES */