From dfb8df71c90e6f306e7abebd7ad94ef93e970ca9 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 12 May 2021 14:17:17 +0800 Subject: [PATCH] =?UTF-8?q?[libc]=E4=BF=AE=E5=A4=8D=E5=9B=A0libc=E7=A7=BB?= =?UTF-8?q?=E9=99=A4sys/errno.h=E6=96=87=E4=BB=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/pthreads/posix_types.h | 7 ------- components/net/lwip-2.1.2/src/arch/include/arch/cc.h | 9 ++++----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/components/libc/pthreads/posix_types.h b/components/libc/pthreads/posix_types.h index f2d806cc9a..942657ef39 100644 --- a/components/libc/pthreads/posix_types.h +++ b/components/libc/pthreads/posix_types.h @@ -19,16 +19,9 @@ #include #include - -/* errno for Keil MDK */ -#if defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__) -#include -#include -#else #include #include #include -#endif #endif diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h index 320beb53e0..413fef65df 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h @@ -46,17 +46,16 @@ #define X32_F "lx" #ifdef RT_USING_LIBC -#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined(__IAR_SYSTEMS_ICC__) -#include -#else #include -/* some errno not defined in newlib */ +#ifndef ENSRNOTFOUND #define ENSRNOTFOUND 163 /* Domain name not found */ +#endif +#ifndef ESHUTDOWN /* WARNING: ESHUTDOWN also not defined in newlib. We chose 180 here because the number "108" which is used in arch.h has been assigned to another error code. */ #define ESHUTDOWN 180 -#endif /* __CC_ARM/__IAR_SYSTEMS_ICC__ */ +#endif #endif /* RT_USING_LIBC */ #if defined(RT_USING_LIBC) || defined(RT_LIBC_USING_TIME) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))