X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fputs.c;h=5a38a49b975adcad3192eda3148ef1acf55ad0df;hp=eb70efdc217bedb99c9db217d96bc706f688d150;hb=599f97360389911c293e0ca4c5eb49e007377fba;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/stdio/puts.c b/src/stdio/puts.c index eb70efdc..5a38a49b 100644 --- a/src/stdio/puts.c +++ b/src/stdio/puts.c @@ -2,5 +2,9 @@ int puts(const char *s) { - return -(fputs(s, stdout) < 0 || putchar('\n') < 0); + int r; + FLOCK(stdout); + r = -(fputs(s, stdout) < 0 || putc_unlocked('\n', stdout) < 0); + FUNLOCK(stdout); + return r; }