aboutsummaryrefslogtreecommitdiff
path: root/libio/freopen64.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/freopen64.c')
-rw-r--r--libio/freopen64.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libio/freopen64.c b/libio/freopen64.c
index d57994df05..f8da78c46e 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -44,8 +44,7 @@ freopen64 (filename, mode, fp)
CHECK_FILE (fp, NULL);
if (!(fp->_flags & _IO_IS_FILEBUF))
return NULL;
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
+ _IO_acquire_lock (fp);
if (filename == NULL && _IO_fileno (fp) >= 0)
{
fd = __dup (_IO_fileno (fp));
@@ -68,8 +67,7 @@ freopen64 (filename, mode, fp)
if (filename != NULL)
free ((char *) filename);
}
- _IO_funlockfile (fp);
- _IO_cleanup_region_end (0);
+ _IO_release_lock (fp);
return result;
#else
__set_errno (ENOSYS);