1From 40bd7d38bd7a15d22459c4b35cfc7480205a57d9 Mon Sep 17 00:00:00 2001 2From: jiangheng12 <jiangheng14@huawei.com> 3Date: Wed, 22 Feb 2023 20:20:35 +0800 4Subject: [PATCH] lwip_cnctl only support F_SETFL,F_GETFL, other opt return 0 5 for compitable 6 7--- 8 src/api/sockets.c | 5 +++++ 9 1 file changed, 5 insertions(+) 10 11diff --git a/src/api/sockets.c b/src/api/sockets.c 12index 9b3f514..2cb6f22 100644 13--- a/src/api/sockets.c 14+++ b/src/api/sockets.c 15@@ -4107,7 +4107,12 @@ lwip_fcntl(int s, int cmd, int val) 16 break; 17 default: 18 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_fcntl(%d, UNIMPL: %d, %d)\n", s, cmd, val)); 19+#if USE_LIBOS 20+ sock_set_errno(sock, 0); /* not yet implemented, but we return 0 for compatilbe with app */ 21+ ret = 0; 22+#else 23 sock_set_errno(sock, ENOSYS); /* not yet implemented */ 24+#endif 25 break; 26 } 27 done_socket(sock); 28-- 292.23.0 30 31