feat(lwip): Midify stand I/O control APIs declare

This commit is contained in:
dongheng
2019-06-13 16:26:05 +08:00
parent a227a22a36
commit 1b2d3b9cf0
4 changed files with 10 additions and 10 deletions

View File

@ -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 */

View File

@ -33,8 +33,3 @@
#include "sdkconfig.h"
#include "lwip/sockets.h"
#ifdef CONFIG_USING_ESP_VFS
#include <unistd.h>
#include <fcntl.h>
#endif

View File

@ -1,7 +1,4 @@
#pragma once
#include <sys/socket.h>
#undef fcntl
#include <sys/fcntl.h>

View File

@ -19,6 +19,8 @@
#include <stdarg.h>
#include <fcntl.h>
#include "lwip/sockets.h"
int fcntl(int fd, int request, ...)
{
int val, ret;