fix popen not to leak pipes from one child to another
[musl] / src / stdio / fgetc.c
index da63868..2578afc 100644 (file)
@@ -1,12 +1,7 @@
-#include "stdio_impl.h"
+#include <stdio.h>
+#include "getc.h"
 
 int fgetc(FILE *f)
 {
-       int c;
-       FLOCK(f);
-       c = getc_unlocked(f);
-       FUNLOCK(f);
-       return c;
+       return do_getc(f);
 }
-
-weak_alias(fgetc, getc);