Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb38fa0

Browse files
donghengdongheng
authored andcommitted
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".
1 parent 9f9ee5a commit bb38fa0

File tree

1 file changed

+6
-0
lines changed
  • components/lwip/lwip/src/include/posix/sys

1 file changed

+6
-0
lines changed

components/lwip/lwip/src/include/posix/sys/socket.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@
3333
#include "sdkconfig.h"
3434

3535
#include "lwip/sockets.h"
36+
37+
#if !LWIP_POSIX_SOCKETS_IO_NAMES
38+
#include <unistd.h>
39+
#include <fcntl.h>
40+
#include <sys/ioctl.h>
41+
#endif /* !LWIP_POSIX_SOCKETS_IO_NAMES */

0 commit comments

Comments
 (0)