Commit 9278190d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use fd critical section in _futime64.

parent 16285f57
...@@ -1788,7 +1788,7 @@ int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf) ...@@ -1788,7 +1788,7 @@ int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf)
*/ */
int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t) int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
{ {
HANDLE hand = msvcrt_fdtoh(fd); ioinfo *info = get_ioinfo(fd);
FILETIME at, wt; FILETIME at, wt;
if (!t) if (!t)
...@@ -1802,11 +1802,13 @@ int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t) ...@@ -1802,11 +1802,13 @@ int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
time_to_filetime( t->modtime, &wt ); time_to_filetime( t->modtime, &wt );
} }
if (!SetFileTime(hand, NULL, &at, &wt)) if (!SetFileTime(info->handle, NULL, &at, &wt))
{ {
release_ioinfo(info);
msvcrt_set_errno(GetLastError()); msvcrt_set_errno(GetLastError());
return -1 ; return -1 ;
} }
release_ioinfo(info);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment