mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fix function signature of fcntl() for LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES (see bug #51701)
This commit is contained in:
parent
c7edfdf987
commit
e749678eed
@ -66,6 +66,10 @@
|
|||||||
#include "lwip/inet_chksum.h"
|
#include "lwip/inet_chksum.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES
|
||||||
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* If the netconn API is not required publicly, then we include the necessary
|
/* If the netconn API is not required publicly, then we include the necessary
|
||||||
@ -3467,6 +3471,20 @@ lwip_fcntl(int s, int cmd, int val)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES
|
||||||
|
int
|
||||||
|
fcntl(int s, int cmd, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
int val;
|
||||||
|
|
||||||
|
va_start(ap, cmd);
|
||||||
|
val = va_arg(ap, int);
|
||||||
|
va_end(ap);
|
||||||
|
return lwip_fcntl(s, cmd, val);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size)
|
lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size)
|
||||||
{
|
{
|
||||||
|
@ -534,7 +534,7 @@ void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destro
|
|||||||
#undef lwip_close
|
#undef lwip_close
|
||||||
#define lwip_close close
|
#define lwip_close close
|
||||||
#define closesocket(s) close(s)
|
#define closesocket(s) close(s)
|
||||||
#define lwip_fcntl fcntl
|
int fcntl(int s, int cmd, ...);
|
||||||
#define lwip_ioctl ioctl
|
#define lwip_ioctl ioctl
|
||||||
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
||||||
#endif /* LWIP_COMPAT_SOCKETS == 2 */
|
#endif /* LWIP_COMPAT_SOCKETS == 2 */
|
||||||
|
Loading…
Reference in New Issue
Block a user