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))) 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);