aws / amazon-freertos

DEPRECATED - See README.md
https://aws.amazon.com/freertos/
MIT License
2.54k stars 1.1k forks source link

POSIX time.h not including expected data structures #2552

Closed osloapps-max closed 3 years ago

osloapps-max commented 4 years ago

Describe the bug The AFR POSIX include for "time.h" does not contain the "tm" data structure as expected. The header file does make a reference to https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html which states that it shall declare this structure.

As this is not done, the user code must take extra steps to make sure the compiler version of the time header is pulled in instead of the POSIX equivalent.

I might be going at this the wrong way in my application but it seems that the header files should at least honor the referenced specification.

System information

Expected behavior That the user can include the in the project with the standard behavior. Currently I have only been able to work around it by including <../include/time.h> to prevent it from selecting the POSIX version.

dachalco commented 4 years ago

Hi @osloapps-max

Thanks for bringing this to our attention. I've queued this to the appropriate internal team and they should provide a response once this issue is addressed.

dachalco commented 3 years ago

Hi @osloapps-max

Recently merged PR #2797 which adds struct tm to our time.h. Please re-open the issue as needed.