"Erich E. Hoover" <[email protected]> writes: > @@ -2048,17 +2048,26 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, > PIO_STATUS_BLOCK io, > > if (info->LastAccessTime.QuadPart || > info->LastWriteTime.QuadPart) > { > +#ifdef HAVE_FUTIMENS > + struct timespec tv[2]; > +#else > struct timeval tv[2]; > +#endif > + int ret; > > if (!info->LastAccessTime.QuadPart || > !info->LastWriteTime.QuadPart) > { > - > - tv[0].tv_sec = tv[0].tv_usec = 0; > - tv[1].tv_sec = tv[1].tv_usec = 0; > + memset(&tv, 0x0, sizeof(tv)); > if (!fstat( fd, &st )) > { > tv[0].tv_sec = st.st_atime; > tv[1].tv_sec = st.st_mtime; > +#if defined(HAVE_FUTIMENS) && defined(HAVE_STRUCT_STAT_ST_ATIM) > + tv[0].tv_nsec = st.st_atim.tv_nsec; > +#endif > +#if defined(HAVE_FUTIMENS) && defined(HAVE_STRUCT_STAT_ST_MTIM) > + tv[1].tv_nsec = st.st_mtim.tv_nsec; > +#endif
You want UTIME_OMIT. Also please try to cut down on the number of #ifdefs. -- Alexandre Julliard [email protected]
