From b972ba7eebe01a243e03333533d36a88ea67c8ca Mon Sep 17 00:00:00 2001 From: Alexander van der Grinten Date: Sun, 19 Apr 2020 19:41:02 +0200 Subject: [PATCH] options/ansi: Add POSIX timezone variables --- options/ansi/generic/time-stubs.cpp | 5 +++++ options/ansi/include/time.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/options/ansi/generic/time-stubs.cpp b/options/ansi/generic/time-stubs.cpp index 58de11a1..a0682332 100644 --- a/options/ansi/generic/time-stubs.cpp +++ b/options/ansi/generic/time-stubs.cpp @@ -14,6 +14,11 @@ #include #include +// Variables defined by POSIX. +int daylight; +long timezone; +char *tzname[2]; + clock_t clock(void) { __ensure(!"Not implemented"); __builtin_unreachable(); diff --git a/options/ansi/include/time.h b/options/ansi/include/time.h index 6a07e030..7cb31d16 100644 --- a/options/ansi/include/time.h +++ b/options/ansi/include/time.h @@ -81,6 +81,10 @@ void tzset(void); extern "C" { #endif +extern int daylight; +extern long timezone; +extern char *tzname[2]; + int nanosleep(const struct timespec *, struct timespec *); int clock_getres(clockid_t, struct timespec *);