From c6958aa181210117586d77b8b26d5bf24ddf9c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E4=BB=99?= Date: Fri, 20 May 2022 16:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSoftBusSocketFdIsset=E5=9C=A8?= =?UTF-8?q?M=E6=A0=B8RISCV32=E6=9E=B6=E6=9E=84=E7=9A=84newlib=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E8=AE=BE=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #I52ACL Signed-off-by: 大仙 --- kal/libc/newlib/porting/include/sys/select.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kal/libc/newlib/porting/include/sys/select.h b/kal/libc/newlib/porting/include/sys/select.h index e5197a4c..7eee91a2 100644 --- a/kal/libc/newlib/porting/include/sys/select.h +++ b/kal/libc/newlib/porting/include/sys/select.h @@ -46,4 +46,11 @@ #include_next +#ifdef LOSCFG_ARCH_RISCV +#ifdef FD_ISSET(d, s) +#undef FD_ISSET(d, s) +#define FD_ISSET(d, s) !!((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long))))) +#endif +#endif + #endif //_ADAPT_SYS_SELECT_H