diff options
Diffstat (limited to 'newlib/libc/stdio/fileno.c')
-rw-r--r-- | newlib/libc/stdio/fileno.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/fileno.c b/newlib/libc/stdio/fileno.c index d578c3e..c9ecbb4 100644 --- a/newlib/libc/stdio/fileno.c +++ b/newlib/libc/stdio/fileno.c @@ -35,6 +35,10 @@ int _DEFUN (fileno, (f), FILE * f) { + int result; + _flockfile(f); CHECK_INIT (f); - return __sfileno (f); + result = __sfileno (f); + _funlockfile(f); + return result; } |