aboutsummaryrefslogtreecommitdiff
path: root/libio/getwchar.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-02-03 09:37:30 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-02-03 09:38:24 +0100
commitee9941f94ea838774c34f60b3397fba07a803d92 (patch)
tree082d81424de2bb74bd63f0087869c956ea437ad7 /libio/getwchar.c
parentc70824b9a4645c0ecd049da8cfdb2c28ae7ada23 (diff)
downloadglibc-ee9941f94ea838774c34f60b3397fba07a803d92.tar
glibc-ee9941f94ea838774c34f60b3397fba07a803d92.tar.gz
glibc-ee9941f94ea838774c34f60b3397fba07a803d92.tar.bz2
glibc-ee9941f94ea838774c34f60b3397fba07a803d92.zip
libio: Use stdin consistently for input functions [BZ #24153]
The internal _IO_stdin_ variable is not updated when the application assigns to stdin, which is a GNU extension.
Diffstat (limited to 'libio/getwchar.c')
-rw-r--r--libio/getwchar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libio/getwchar.c b/libio/getwchar.c
index baac916fdd..b6155fa276 100644
--- a/libio/getwchar.c
+++ b/libio/getwchar.c
@@ -33,8 +33,8 @@ wint_t
getwchar (void)
{
wint_t result;
- _IO_acquire_lock (_IO_stdin);
- result = _IO_getwc_unlocked (_IO_stdin);
- _IO_release_lock (_IO_stdin);
+ _IO_acquire_lock (stdin);
+ result = _IO_getwc_unlocked (stdin);
+ _IO_release_lock (stdin);
return result;
}