From 91864a8c507f91fad6262fe53de99192c2936e05 Mon Sep 17 00:00:00 2001 From: lyon1998 Date: Fri, 18 Mar 2022 13:07:20 +0800 Subject: [PATCH] add __linux in __platform_getchar --- src/PikaPlatform.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PikaPlatform.c b/src/PikaPlatform.c index b2c02ef78..bbcdbc149 100644 --- a/src/PikaPlatform.c +++ b/src/PikaPlatform.c @@ -85,7 +85,6 @@ PIKA_WEAK int __platform_sprintf(char* buff, char* fmt, ...) { return res; } - PIKA_WEAK void __platform_wait(void) { while (1) { }; @@ -99,6 +98,11 @@ PIKA_WEAK void* __platform_memcpy(void* dir, const void* src, size_t size) { } PIKA_WEAK char __platform_getchar(void) { +#ifdef __linux return getchar(); +#else + __platform_printf("[error]: __platform_getchar need impaltment!\r\n"); + while (1) { + } +#endif } -