mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-17 13:46:56 +08:00
Fix function signature of fcntl() for LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES (see bug #51701)
This commit is contained in:
@@ -66,6 +66,10 @@
|
||||
#include "lwip/inet_chksum.h"
|
||||
#endif
|
||||
|
||||
#if LWIP_COMPAT_SOCKETS == 2 && LWIP_POSIX_SOCKETS_IO_NAMES
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
#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 *
|
||||
lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user