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/fdopen64.c')
-rw-r--r--newlib/libc/stdio64/fdopen64.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/stdio64/fdopen64.c b/newlib/libc/stdio64/fdopen64.c
index aa5a9ce56..d0fd0d584 100644
--- a/newlib/libc/stdio64/fdopen64.c
+++ b/newlib/libc/stdio64/fdopen64.c
@@ -63,9 +63,6 @@ _DEFUN (_fdopen64_r, (ptr, fd, mode),
if ((fp = __sfp (ptr)) == 0)
return 0;
-
- _flockfile(fp);
-
fp->_flags = flags;
/*
* If opened for appending, but underlying descriptor
@@ -102,9 +99,12 @@ _DEFUN (_fdopen64_r, (ptr, fd, mode),
fp->_flags |= __SCLE;
#endif
+#ifndef __SINGLE_THREAD__
+ __lock_init_recursive (*(_LOCK_RECURSIVE_T *)&fp->_lock);
+#endif
+
fp->_flags |= __SL64;
- _funlockfile(fp);
return fp;
}