Loading...
--- Libc/Libc-763.13/stdio/FreeBSD/wsetup.c
+++ Libc/Libc-1158.20.4/stdio/FreeBSD/wsetup.c
@@ -51,8 +51,7 @@
FILE *fp;
{
/* make sure stdio is set up */
- if (!__sdidinit)
- __sinit();
+ pthread_once(&__sdidinit, __sinit);
/*
* If we are not writing, we had better be reading and writing.