From 702a1f9f54f71a7001aa307cf075fa7292f47641 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 24 Jul 2017 13:28:18 +0200 Subject: [PATCH] mescc: Tinycc support: localtime stub. * mlibc/include/time.h (localtime): Declare. * mlibc/libc-mes+tcc.c (localtime): Add stub. --- mlibc/include/time.h | 1 + mlibc/libc-mes+tcc.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mlibc/include/time.h b/mlibc/include/time.h index a80ea12c..6c2fc12a 100644 --- a/mlibc/include/time.h +++ b/mlibc/include/time.h @@ -38,6 +38,7 @@ struct tm { int tm_isdst; /* Daylight saving time */ }; +struct tm *localtime (time_t const *timep); time_t time (time_t *tloc); #endif // ! (__GNUC__ && POSIX) diff --git a/mlibc/libc-mes+tcc.c b/mlibc/libc-mes+tcc.c index 342d1f78..807b0092 100644 --- a/mlibc/libc-mes+tcc.c +++ b/mlibc/libc-mes+tcc.c @@ -31,6 +31,12 @@ close () asm ("int____$0x80"); } +struct tm * +localtime (time_t const *timep) +{ + return 0; +} + void * memcpy (void *dest, void const *src, size_t n) {