From 540a5295c37ba4af19f6473796aa4289d65d7da5 Mon Sep 17 00:00:00 2001 From: Christian Griebel Date: Thu, 6 Nov 2025 12:55:50 +0100 Subject: [PATCH 1/2] Use macro from "zephyr/toolchain/gcc.h" to define "__noreturn". --- include/utils/utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/utils/utils.h b/include/utils/utils.h index dfffe94..3634127 100644 --- a/include/utils/utils.h +++ b/include/utils/utils.h @@ -152,6 +152,7 @@ extern "C" { #include // __weak, __builtin_xxx() etc., #define PATH_SEPARATOR '/' +#define __noreturn FUNC_NORETURN #define __unreachable() __builtin_unreachable() #define __format_printf(x, y) __attribute__((format(printf, x, y))) From 366559cba1190e240f9a58a0c6b40f0180f516df Mon Sep 17 00:00:00 2001 From: Christian Griebel Date: Thu, 6 Nov 2025 12:56:41 +0100 Subject: [PATCH 2/2] Avoid duplicated symbol "gettimeofday" when linking against Zephyr. --- src/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.c b/src/utils.c index a4459b5..b02ab68 100644 --- a/src/utils.c +++ b/src/utils.c @@ -164,6 +164,9 @@ struct timezone { }; #endif +int gettimeofday(struct timeval * tp, struct timezone * tzp); + +#ifndef __ZEPHYR__ int gettimeofday(struct timeval * tp, struct timezone * tzp) { ARG_UNUSED(tzp); @@ -171,6 +174,7 @@ int gettimeofday(struct timeval * tp, struct timezone * tzp) tp->tv_usec = 0; return 0; } +#endif int add_iso8601_utc_datetime(char* buf, size_t size) { ARG_UNUSED(buf);