From b9e66bfcfb572c11e8cfa54a9b9af76cad8d319a Mon Sep 17 00:00:00 2001 From: sg Date: Fri, 10 Feb 2017 21:18:08 +0100 Subject: [PATCH] Provide a better way to include system's for errno + error numbers (LWIP_ERRNO_INCLUDE can't be defined to at least on GCC/linux) --- src/include/lwip/arch.h | 3 ++- src/include/lwip/errno.h | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/arch.h b/src/include/lwip/arch.h index fa627459..6097619a 100644 --- a/src/include/lwip/arch.h +++ b/src/include/lwip/arch.h @@ -296,7 +296,8 @@ extern "C" { #endif /* LWIP_UNUSED_ARG */ /** LWIP_PROVIDE_ERRNO==1: Let lwIP provide ERRNO values and the 'errno' variable. - * If this is disabled, cc.h must either define 'errno', include or + * If this is disabled, cc.h must either define 'errno', include , + * define LWIP_ERRNO_STDINCLUDE to get included or * define LWIP_ERRNO_INCLUDE to or equivalent. */ #if defined __DOXYGEN__ diff --git a/src/include/lwip/errno.h b/src/include/lwip/errno.h index 641cffb0..48d6b539 100644 --- a/src/include/lwip/errno.h +++ b/src/include/lwip/errno.h @@ -179,10 +179,15 @@ extern int errno; #else /* LWIP_PROVIDE_ERRNO */ -/* Define LWIP_ERRNO_INCLUDE to to include the error defines here */ +/* Define LWIP_ERRNO_STDINCLUDE if you want to include here */ +#ifdef LWIP_ERRNO_STDINCLUDE +#include +#else /* LWIP_ERRNO_STDINCLUDE */ +/* Define LWIP_ERRNO_INCLUDE to an equivalent of to include the error defines here */ #ifdef LWIP_ERRNO_INCLUDE #include LWIP_ERRNO_INCLUDE #endif /* LWIP_ERRNO_INCLUDE */ +#endif /* LWIP_ERRNO_STDINCLUDE */ #endif /* LWIP_PROVIDE_ERRNO */