renesas / fsp

Flexible Software Package (FSP) for Renesas RA MCU Family
https://renesas.github.io/fsp/
Other
182 stars 82 forks source link

AWS Sockets Wrapper Layer Migration for FreeRTOS Plus TCP 4.0.0 #314

Closed GodavarthyAravinda closed 5 months ago

GodavarthyAravinda commented 8 months ago

Issue

In case both tcp_sockets_wrapper.h and FreeRTOS_Sockets.h are included in a file, a redefinition error of typedef Socket_t will be reported when using IAR toolchain.

Workaround

Here are 2 ways to fix this issue:

  1. Refactor the code to not include both tcp_sockets_wrapper.h and FreeRTOS_Sockets.h in the same file.
  2. Define SOCKET_T_TYPEDEFED in the source file before including tcp_sockets_wrapper.h. This will let the file tcp_sockets_wrapper.h know that Socket_t is already defined.