When trying to build ChibiOS with HAL_USE_RTC and LwIP I get a compile error. HAL_USE_RTC causes the include of the system's time.h which defines struct timeval. LwIP with LWIP_TIMEVAL_PRIVATE (ChibiOS/ext/lwip/src/include/lwip/sockets.h:309) defined to 1 also defines struct timeval.
Adding
#define LWIP_TIMEVAL_PRIVATE 0to lwipopts.h fixes this, but it feels like a bodge.Fixed with lwIP 2.0 merge.