X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffputc.c;h=99532965c6894f6f52f4b37576ad6e3d2f3c4af2;hb=7650390de8f72822ec0d4a9fb5b52efcf0be4698;hp=98d0a20aca814bddf897c8049aff06af9c4cf75e;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/fputc.c b/src/stdio/fputc.c index 98d0a20a..99532965 100644 --- a/src/stdio/fputc.c +++ b/src/stdio/fputc.c @@ -2,10 +2,12 @@ int fputc(int c, FILE *f) { - FLOCK(f); + if (f->lock < 0 || !__lockfile(f)) + return putc_unlocked(c, f); c = putc_unlocked(c, f); - FUNLOCK(f); + __unlockfile(f); return c; } weak_alias(fputc, putc); +weak_alias(fputc, _IO_putc);