musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/fgetc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fgetc.c')
-rw-r--r--src/stdio/fgetc.c 5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stdio/fgetc.c b/src/stdio/fgetc.c
index da638684..4d8aca37 100644
--- a/src/stdio/fgetc.c
+++ b/src/stdio/fgetc.c
@@ -3,9 +3,10 @@
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;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月07日 22:23:14 +0000

AltStyle によって変換されたページ (->オリジナル) /