X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..refs/heads/master:/stdio/FreeBSD/wsetup.c?ds=sidebyside diff --git a/stdio/FreeBSD/wsetup.c b/stdio/FreeBSD/wsetup.c index ea1b9e8..b0bdfb4 100644 --- a/stdio/FreeBSD/wsetup.c +++ b/stdio/FreeBSD/wsetup.c @@ -51,8 +51,7 @@ __swsetup(fp) 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.