fix up minor misplacement of restrict keyword in spawnattr sched stubs
[musl] / src / stdio / fgetc.c
index da63868..e122416 100644 (file)
@@ -3,10 +3,9 @@
 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);