Redefined types when using FreeRTOS+POSIX and GCC compiler (Linaro v6.3.1)

I commented under James’ post here – Building FreeRTOS + POSIX with GCC for RISC V architecture

In general, POSIX threading standard defines a set of interfaces, and POSIX “compliant” systems can “optionally” implement whatever makes sense to the system. In our case, we scoped out these headers, and our implementation assumed types are defined in FreeRTOS_POSIX/sys/types.h. Some of the definitions in sys/types.h are similar across various systems. (Likely, time_t and clock_t.) The others in our implementation rely on FreeRTOS specific structures (e.g. pthread_*. )

In case of conflicting definitions, I would first figure out which implementation to use – toolchain specific or FreeRTOS+POSIX or mixed. And if FreeRTOS+POSIX is involved in project, user could configure which type definitions to use. Our intention is that user does not need to change source and/or FreeRTOS_POSIX_portable_default.h, types can be configured with an additional header file. Please see examples in FreeRTOS-Plus-POSIX/include/portable/<vendor>/<board>/. (In espressif and microchip, you’ll see we are not using default types.)

Hope this explains a little bit.