mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-11 06:27:41 +00:00
Fixes for Windows
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <cstring>
|
||||
#ifndef _WIN32
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
|
||||
namespace amuse
|
||||
@@ -507,8 +509,13 @@ void AudioGroupSampleDirectory::EntryData::patchMetadataWAV(SystemStringView wav
|
||||
/* File timestamps reflect actual audio content, not loop/pitch data */
|
||||
static void SetAudioFileTime(const SystemString& path, const Sstat& stat)
|
||||
{
|
||||
#if _WIN32
|
||||
__utimbuf64 times = { stat.st_atime, stat.st_mtime };
|
||||
_wutime64(path.c_str(), ×);
|
||||
#else
|
||||
struct timespec times[] = { stat.st_atim, stat.st_mtim };
|
||||
utimensat(AT_FDCWD, path.c_str(), times, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void AudioGroupSampleDirectory::Entry::patchSampleMetadata(SystemStringView basePath) const
|
||||
|
||||
Reference in New Issue
Block a user