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