fix microblaze asm relocations for shared libc
[musl] / src / stdio / fgetc.c
index da63868..65a10fa 100644 (file)
@@ -3,10 +3,12 @@
 int fgetc(FILE *f)
 {
        int c;
-       FLOCK(f);
+       if (f->lock < 0 || !__lockfile(f))
+               return getc_unlocked(f);
        c = getc_unlocked(f);
-       FUNLOCK(f);
+       __unlockfile(f);
        return c;
 }
 
 weak_alias(fgetc, getc);
+weak_alias(fgetc, _IO_getc);