mbedtls warning "implicit declaration of function 'time'"

David Leach

I’m having some weirdness with building the mbedtls module giving me a compiler warning related to “time”:


/home/dleach/work/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:74:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration]

#define mbedtls_time   time


/home/dleach/work/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:697:9: note: in expansion of macro 'mbedtls_time'

     t = mbedtls_time( NULL );



The warning is coming from my PR #17736 for /tests/lib/fdtable/. What is confusing me is that using similar configurations for /tests/crypto/rand32, which builds the same file, doesn’t get the warnings. Generally speaking the mbedtls stuff is an optional configuration between mbedtls and tinycrypt but for the KW41Z I have it generically turned mbedtls on.


I can also get the warning to go away for the fdtable test if I enable “CONFIG_NEW_LIBC”.


David Leach


NXP Semiconductors

phone: +

Email: david.leach@...





Join users@lists.zephyrproject.org to automatically receive all group messages.