mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +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);
|
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 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user