Always use utimbuf when building for Windows

This commit is contained in:
Cameron Cawley 2022-03-18 17:16:07 +00:00 committed by Martijn van Beurden
parent 11b72938c1
commit ce18b591a0
4 changed files with 4 additions and 4 deletions

View File

@ -3422,7 +3422,7 @@ FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stats)
void set_file_stats_(const char *filename, struct flac_stat_s *stats)
{
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) && !defined(_WIN32)
struct timespec srctime[2] = {};
srctime[0].tv_sec = stats->st_atime;
srctime[1].tv_sec = stats->st_mtime;

View File

@ -54,7 +54,7 @@ void grabbag__file_copy_metadata(const char *srcpath, const char *destpath)
struct flac_stat_s srcstat;
if(0 == flac_stat(srcpath, &srcstat)) {
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) && !defined(_WIN32)
struct timespec srctime[2] = {};
srctime[0].tv_sec = srcstat.st_atime;
srctime[1].tv_sec = srcstat.st_mtime;

View File

@ -272,7 +272,7 @@ void set_file_stats_(const char *filename, struct flac_stat_s *stats)
FLAC__ASSERT(0 != filename);
FLAC__ASSERT(0 != stats);
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) && !defined(_WIN32)
struct timespec srctime[2] = {};
srctime[0].tv_sec = stats->st_atime;
srctime[1].tv_sec = stats->st_mtime;

View File

@ -255,7 +255,7 @@ static FLAC__bool get_file_stats_(const char *filename, struct flac_stat_s *stat
static void set_file_stats_(const char *filename, struct flac_stat_s *stats)
{
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L) && !defined(_WIN32)
struct timespec srctime[2] = {};
srctime[0].tv_sec = stats->st_atime;
srctime[1].tv_sec = stats->st_mtime;