Loading...
--- Libc/Libc-1725.40.4/stdio/FreeBSD/wsetup.c
+++ Libc/Libc-825.26/stdio/FreeBSD/wsetup.c
@@ -47,10 +47,12 @@
* _wsetup returns 0 if OK to write; otherwise, it returns EOF and sets errno.
*/
int
-__swsetup(FILE *fp)
+__swsetup(fp)
+ FILE *fp;
{
/* make sure stdio is set up */
- pthread_once(&__sdidinit, __sinit);
+ if (!__sdidinit)
+ __sinit();
/*
* If we are not writing, we had better be reading and writing.