mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
fix socket fcntl has wrong number of parameters in lwip
This commit is contained in:
parent
546daaabe0
commit
2ac39e522d
@ -119,7 +119,7 @@ void _socket_socket__connect(PikaObj* self, char* host, int port) {
|
||||
return;
|
||||
}
|
||||
if (obj_getInt(self, "blocking") == 0) {
|
||||
int flags = fcntl(sockfd, F_GETFL);
|
||||
int flags = fcntl(sockfd, F_GETFL, 0);
|
||||
if (fcntl(sockfd, F_SETFL, flags | O_NONBLOCK) == -1) {
|
||||
obj_setErrorCode(self, PIKA_RES_ERR_RUNTIME_ERROR);
|
||||
pika_platform_printf("Unable to set socket non blocking\n");
|
||||
|
@ -119,7 +119,7 @@ void _socket_socket__connect(PikaObj* self, char* host, int port) {
|
||||
return;
|
||||
}
|
||||
if (obj_getInt(self, "blocking") == 0) {
|
||||
int flags = fcntl(sockfd, F_GETFL);
|
||||
int flags = fcntl(sockfd, F_GETFL, 0);
|
||||
if (fcntl(sockfd, F_SETFL, flags | O_NONBLOCK) == -1) {
|
||||
obj_setErrorCode(self, PIKA_RES_ERR_RUNTIME_ERROR);
|
||||
pika_platform_printf("Unable to set socket non blocking\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user