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

Skip to content

Commit a80d15f

Browse files
committed
Merge branch 'feature/modify_std_io_header_file_declare' into 'master'
esp-lMidify stand I/O control APIs declare See merge request sdk/ESP8266_RTOS_SDK!982
2 parents 20bafaf + 1b2d3b9 commit a80d15f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

components/lwip/lwip/src/include/lwip/sockets.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,15 @@ int lwip_fcntl(int s, int cmd, int val);
580580
/** @ingroup socket */
581581
#define close(s) lwip_close(s)
582582
/** @ingroup socket */
583-
#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val)
583+
584+
/* Disable here to use stand APIs */
585+
//#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val)
584586
/** @ingroup socket */
585-
#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp)
587+
//#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp)
588+
589+
int ioctl(int fd, int request, ...);
590+
int fcntl(int fd, int request, ...);
591+
586592
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
587593
#endif /* LWIP_COMPAT_SOCKETS != 2 */
588594

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

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

3535
#include "lwip/sockets.h"
36-
37-
#ifdef CONFIG_USING_ESP_VFS
38-
#include <unistd.h>
39-
#include <fcntl.h>
40-
#endif
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11

22
#pragma once
33

4-
#include <sys/socket.h>
5-
#undef fcntl
6-
74
#include <sys/fcntl.h>

components/vfs/port/fcntl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <stdarg.h>
2020
#include <fcntl.h>
2121

22+
#include "lwip/sockets.h"
23+
2224
int fcntl(int fd, int request, ...)
2325
{
2426
int val, ret;

0 commit comments

Comments
 (0)