From fa35e883d758a219f9308d91bf7680dfa0867246 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 23 Oct 2022 10:01:03 +0200 Subject: [PATCH] libc: Stub out strftime --- libs/libc/include/time.h | 7 +++++-- libs/libc/src/time.cpp | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/libc/include/time.h b/libs/libc/include/time.h index 9069c42d..3a6f97cc 100644 --- a/libs/libc/include/time.h +++ b/libs/libc/include/time.h @@ -1,6 +1,8 @@ #ifndef _TIME_H #define _TIME_H +#include + typedef long int clock_t; typedef long int time_t; @@ -34,8 +36,9 @@ extern "C" /* FIXME: For now, is an alias for clock(), but in seconds. */ time_t time(time_t* tloc); - struct tm* localtime(const time_t* timep); // Not implemented. - struct tm* gmtime(const time_t* timep); // Not implemented. + struct tm* localtime(const time_t* timep); // Not implemented. + struct tm* gmtime(const time_t* timep); // Not implemented. + size_t strftime(char* str, size_t max, const char* format, const struct tm* time); // Not implemented. #ifdef __cplusplus } diff --git a/libs/libc/src/time.cpp b/libs/libc/src/time.cpp index d6d8b441..70f3b8df 100644 --- a/libs/libc/src/time.cpp +++ b/libs/libc/src/time.cpp @@ -28,4 +28,9 @@ extern "C" { NOT_IMPLEMENTED("gmtime"); } + + size_t strftime(char*, size_t, const char*, const struct tm*) + { + NOT_IMPLEMENTED("strftime"); + } } \ No newline at end of file