diff --git a/mos-platform/common/c/stdio-minimal.c b/mos-platform/common/c/stdio-minimal.c index 5a2fdc67..b32a8f6d 100644 --- a/mos-platform/common/c/stdio-minimal.c +++ b/mos-platform/common/c/stdio-minimal.c @@ -5,9 +5,10 @@ #include #include -__attribute__((weak)) FILE *stdin; -__attribute__((weak)) FILE *stdout; -__attribute__((weak)) FILE *stderr; +// These need to be non-null, but their contents otherwise doesn't matter. +__attribute__((weak)) FILE *stdin = (FILE *)1; +__attribute__((weak)) FILE *stdout = (FILE *)1; +__attribute__((weak)) FILE *stderr = (FILE *)1; // Character input/output functions