From c8511c1ea0da5a7a11f05ded0e53f0aff5f360dc Mon Sep 17 00:00:00 2001 From: Ilya Tagunov Date: Tue, 12 Nov 2024 16:52:59 +0000 Subject: [PATCH] lib: libc: arcmwdt: add declarations for reentrant time functions ARC MWDT library does not contain implementations for the reentrant POSIX time functions, so common Zephyr implementations end up being used instead. However, there are no declarations, so we just add them here, unguarded, until a better place is found. Signed-off-by: Ilya Tagunov --- lib/libc/arcmwdt/include/time.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/libc/arcmwdt/include/time.h diff --git a/lib/libc/arcmwdt/include/time.h b/lib/libc/arcmwdt/include/time.h new file mode 100644 index 00000000000..245bd3a77d2 --- /dev/null +++ b/lib/libc/arcmwdt/include/time.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Synopsys + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef LIB_LIBC_ARCMWDT_INCLUDE_TIME_H_ +#define LIB_LIBC_ARCMWDT_INCLUDE_TIME_H_ + +#include_next + +#ifdef __cplusplus +extern "C" { +#endif + +extern char *asctime_r(const struct tm *tp, char *buf); +extern char *ctime_r(const time_t *clock, char *buf); +extern struct tm *gmtime_r(const time_t *timep, struct tm *result); +extern struct tm *localtime_r(const time_t *timer, struct tm *result); + +#ifdef __cplusplus +} +#endif + +#endif /* LIB_LIBC_ARCMWDT_INCLUDE_TIME_H_ */