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
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/stdio/puts.c 6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stdio/puts.c b/src/stdio/puts.c
index eb70efdc..4c0e583c 100644
--- a/src/stdio/puts.c
+++ b/src/stdio/puts.c
@@ -2,5 +2,9 @@
int puts(const char *s)
{
- return -(fputs(s, stdout) < 0 || putchar('\n') < 0);
+ int r;
+ FLOCK(stdout);
+ r = -(fputs(s, stdout) < 0 || putchar('\n') < 0);
+ FUNLOCK(stdout);
+ return r;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月30日 01:44:51 +0000

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