Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio64/fgetpos64.c')
-rw-r--r--newlib/libc/stdio64/fgetpos64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/newlib/libc/stdio64/fgetpos64.c b/newlib/libc/stdio64/fgetpos64.c
index 36f7ec90b..5f8c1c3ab 100644
--- a/newlib/libc/stdio64/fgetpos64.c
+++ b/newlib/libc/stdio64/fgetpos64.c
@@ -60,12 +60,15 @@ _DEFUN (_fgetpos64_r, (ptr, fp, pos),
FILE * fp _AND
_fpos64_t * pos)
{
+ _flockfile(fp);
*pos = (_fpos64_t)_ftello64_r (ptr, fp);
if (*pos != -1)
{
+ _funlockfile(fp);
return 0;
}
+ _funlockfile(fp);
return 1;
}