fix inet_ioctlsocket set O_LARGEFILE flag by musl.

This commit is contained in:
geniusgogo 2023-02-24 21:02:04 +08:00 committed by guo
parent d3553e7220
commit 53afeda538
1 changed files with 4 additions and 1 deletions

View File

@ -225,11 +225,14 @@ static int inet_getsockname(int socket, struct sockaddr *name, socklen_t *namele
int inet_ioctlsocket(int socket, long cmd, void *arg) int inet_ioctlsocket(int socket, long cmd, void *arg)
{ {
int flags;
switch (cmd) switch (cmd)
{ {
case F_GETFL: case F_GETFL:
case F_SETFL: case F_SETFL:
return lwip_fcntl(socket, cmd, (int)(size_t)arg); flags = (int)(size_t)arg;
flags &= ~O_LARGEFILE;
return lwip_fcntl(socket, cmd, flags);
default: default:
return lwip_ioctl(socket, cmd, arg); return lwip_ioctl(socket, cmd, arg);