]> git.meshlink.io Git - meshlink-tiny/blobdiff - src/conf.c
Build for ESP8266.
[meshlink-tiny] / src / conf.c
index cae7bd1e90de73c44e4db0acc0677acd7705c2ab..bdd2bc9afafca267c042aa51c3547242881780bd 100644 (file)
@@ -316,11 +316,13 @@ static bool copytree(const char *src_dir_name, const void *src_key, const char *
 
                        config_free(&config);
 
-                       struct utimbuf times;
-                       times.modtime = st.st_mtime;
-                       times.actime = st.st_atime;
+                       const struct timeval times[2] = {{
+                                       st.st_mtime,
+                                       st.st_atime,
+                               }
+                       };
 
-                       if(utime(dst_filename, &times)) {
+                       if(utimes(dst_filename, times)) {
                                logger(NULL, MESHLINK_ERROR, "Failed to utime `%s': %s", dst_filename, strerror(errno));
                                meshlink_errno = MESHLINK_ESTORAGE;
                                return false;