From 4721337c7c5a82f2848571b23813ce16e3238e5a Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 3 Jul 2020 20:19:36 -0500 Subject: [PATCH] issues with gettime on mach kernel. --- src/core/util.c | 5 +++++ src/mainclient/shell.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/core/util.c b/src/core/util.c index 407545f6..d4af5667 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -596,6 +596,11 @@ JanetTable *janet_get_core_table(const char *name) { /* Clock shims for various platforms */ #ifdef JANET_GETTIME +/* For macos */ +#ifdef __MACH__ +#include +#include +#endif #ifdef JANET_WINDOWS int janet_gettime(struct timespec *spec) { FILETIME ftime; diff --git a/src/mainclient/shell.c b/src/mainclient/shell.c index 2c28c9bb..600ac8c3 100644 --- a/src/mainclient/shell.c +++ b/src/mainclient/shell.c @@ -1006,8 +1006,10 @@ int main(int argc, char **argv) { SetConsoleOutputCP(65001); #endif +#if !defined(JANET_WINDOWS) && !defined(JANET_SIMPLE_GETLINE) /* Try and not leave the terminal in a bad state */ atexit(norawmode); +#endif /* Set up VM */ janet_init();