simplify __stdio_exit static linking logic
[musl] / src / stdio / __towrite.c
index 4bf96f4..0a69d92 100644 (file)
@@ -17,8 +17,9 @@ int __towrite(FILE *f)
        return 0;
 }
 
-/* Link flush-on-exit code iff any stdio write functions are linked. */
-void __fflush_on_exit()
+void __stdio_exit_needed(void);
+
+void __towrite_needs_stdio_exit()
 {
-       fflush(0);
+       __stdio_exit_needed();
 }