diff options
Diffstat (limited to 'stdio-common/flockfile.c')
-rw-r--r-- | stdio-common/flockfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdio-common/flockfile.c b/stdio-common/flockfile.c index 0bc856a465..a66e0a731e 100644 --- a/stdio-common/flockfile.c +++ b/stdio-common/flockfile.c @@ -17,13 +17,13 @@ <https://www.gnu.org/licenses/>. */ #include <stdio.h> - -#undef _IO_flockfile +#include <stdio-lock.h> void __flockfile (FILE *stream) { - /* Do nothing. Using this version does not do any locking. */ + stream->_flags2 |= _IO_FLAGS2_NEED_LOCK; + _IO_lock_lock (*stream->_lock); } weak_alias (__flockfile, flockfile); weak_alias (__flockfile, _IO_flockfile) |