When creating a BSP in SDK with the LwIP enabled and the IGMP setting set to true, this causes the BSP to fail to build with the error message below:
lwip-1.4.0/src/core/init.c:183:4: error: #error "When using IGMP, LWIP_RAND() needs to be defined to a random-function returning an u32_t random value"
How can this issue be addressed?
To fix this issue, open the cc.h file in the LwIP source directory on your local machine:
<XILINX EDK INSTALL>\sw\ThirdParty\sw_services\lwip140_v1_04_a\src\contrib\ports\xilinx\include\arch
Then, add the line below just before the #endif:
#define LWIP_RAND() ((u32_t)rand())
Save the cc.h. Then, in SDK go to Project -> Clean and clean the BSP.