Allow user to override LWIP_PROVIDE_ERRNO
Zob314 opened this issue · 4 comments
This doesn't allow LWIP_PROVIDE_ERRNO
to be overridden:
stm32_mw_lwip/system/arch/cc.h
Lines 40 to 42 in f0d19c3
Suggest replacing with the following:
#if !defined(LWIP_ERRNO_STDINCLUDE) && !defined(LWIP_ERRNO_INCLUDE) && !defined(LWIP_PROVIDE_ERRNO)
#define LWIP_PROVIDE_ERRNO
#endif
to align with this comment:
stm32_mw_lwip/src/include/lwip/opt.h
Lines 47 to 52 in f0d19c3
I had a similar issue, although at least in my case I was able to override in lwipopts.h, with this: -
/* USER CODE BEGIN 1 /
#undef LWIP_PROVIDE_ERRNO
#define LWIP_ERRNO_STDINCLUDE
/ USER CODE END 1 */
It is obtuse and would be better implemented as suggested.
In my case, this comes about if you enable configUSE_NEWLIB_REENTRANT (also missing from CubeMX) for FreeRTOS (which is AFAIK required for proper threadsafe newlib usage).
ST Internal Reference: 126118