stdlib: Guard fflush in exit with CONFIG_FILE_STREAM

If CONFIG_FILE_STREAM disabled, fflush is a undefined function.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2023-02-11 08:51:42 +08:00 committed by Xiang Xiao
parent 1b372a55cc
commit a66f0a6369
1 changed files with 2 additions and 0 deletions

View File

@ -88,9 +88,11 @@ void exit(int status)
atexit_call_exitfuncs(status, false); atexit_call_exitfuncs(status, false);
#ifdef CONFIG_FILE_STREAM
/* Flush all streams */ /* Flush all streams */
fflush(NULL); fflush(NULL);
#endif
/* Then perform the exit */ /* Then perform the exit */