Always use utimes() instead of utimensat() since the latter is not available

even on some recent unix systems.

FossilOrigin-Name: 30ed7a4b6408f0ca921abc4d8b7bb5404fc7708cedcd104b017b361054e7148c
This commit is contained in:
drh
2018-01-12 14:34:45 +00:00
parent f225059b8b
commit 6ac7303e1a
3 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -86,6 +86,7 @@ SQLITE_EXTENSION_INIT1
# include <unistd.h>
# include <dirent.h>
# include <utime.h>
# include <sys/time.h>
#else
# include "windows.h"
# include <io.h>
@@ -285,7 +286,7 @@ static int writeFile(
}else{
return 1;
}
#elif defined(AT_FDCWD)
#elif defined(AT_FDCWD) && 0 /* utimensat() is not univerally available */
/* Recent unix */
struct timespec times[2];
times[0].tv_nsec = times[1].tv_nsec = 0;