# HG changeset patch # User Mike Becker # Date 1746203758 -7200 # Node ID 4a9227846234b27b4e202f9b7b82e38d9615133b # Parent 0b61e0164b445236789d8379e6d680f935e98d51 fix some inconsistencies related to #297 diff -r 0b61e0164b44 -r 4a9227846234 dav/sync.c --- a/dav/sync.c Thu May 01 12:40:00 2025 +0200 +++ b/dav/sync.c Fri May 02 18:35:58 2025 +0200 @@ -3634,7 +3634,7 @@ finfo_get_values(fileinfo, &f); if((dir->metadata & FINFO_MTIME) == FINFO_MTIME && f.date_set) { // set mtime - sys_utimbuf t; + SYS_UTIMBUF t; t.actime = f.last_modified; t.modtime = f.last_modified; if(sys_utime(path, &t)) { diff -r 0b61e0164b44 -r 4a9227846234 dav/system.c --- a/dav/system.c Thu May 01 12:40:00 2025 +0200 +++ b/dav/system.c Fri May 02 18:35:58 2025 +0200 @@ -528,8 +528,8 @@ return ret; } -int sys_utime(const char* filename, sys_utimbuf* times) { - wchar_t* wpath = path2winpath(filename, FALSE, NULL); +int sys_utime(const char *filename, SYS_UTIMBUF *times) { + wchar_t *wpath = path2winpath(filename, FALSE, NULL); if (!wpath) { fprintf(stderr, "sys_utime: cannot convert path\n"); return -1; diff -r 0b61e0164b44 -r 4a9227846234 dav/system.h --- a/dav/system.h Thu May 01 12:40:00 2025 +0200 +++ b/dav/system.h Fri May 02 18:35:58 2025 +0200 @@ -38,18 +38,20 @@ #ifdef _WIN32 #include +#ifndef mode_t #define mode_t unsigned int +#endif #include -typedef struct _utimbuf sys_utimbuf; -int sys_utime(const char* filename, sys_utimbuf* times); +#define SYS_UTIMBUF struct _utimbuf +int sys_utime(const char *filename, SYS_UTIMBUF *times); #else // not _WIN32 #include #include -typedef struct utimbuf sys_utimbuf; +#define SYS_UTIMBUF struct utimbuf #define sys_utime utime #endif // _WIN32