Changelog
Latest Changes
- Branch:
- develop
- Commit:
zephyr: Conditionally include <time.h> for POSIX time functions by Yasushi SHOJI at 2025-10-03 06:42:32
Zephyr’s POSIX time support has been updated (PR #95226) to provide a new header <zephyr/posix/posix_time.h>. This change ensures that <time.h> can be included safely, even when a libc previously provided its own conflicting version. To maintain compatibility before and after the PR, this patch uses __has_include to prefer <time.h> when <zephyr/posix/posix_time.h> is available, and falls back to <zephyr/posix/time.h> otherwise. This prevents build errors caused by incompatible or incomplete <time.h> implementations in some environments. References: – https://github.com/zephyrproject-rtos/zephyr/pull/95226 – https://github.com/zephyrproject-rtos/zephyr/discussions/96911 – https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>