mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 20:06:24 +08:00
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:
@@ -88,9 +88,11 @@ void exit(int status)
|
||||
|
||||
atexit_call_exitfuncs(status, false);
|
||||
|
||||
#ifdef CONFIG_FILE_STREAM
|
||||
/* Flush all streams */
|
||||
|
||||
fflush(NULL);
|
||||
#endif
|
||||
|
||||
/* Then perform the exit */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user