SCCS-vsn: bin/cp/utils.c 5.7
-static char sccsid[] = "@(#)utils.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)utils.c 5.7 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/time.h>
#endif /* not lint */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/time.h>
+#include <fcntl.h>
+#include <fts.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
fs->st_mode &= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO;
fs->st_mode &= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO;
- tv[0].tv_sec = fs->st_atime;
- tv[1].tv_sec = fs->st_mtime;
+ TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
+ TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
if (utimes(to.p_path, tv))
err("utimes: %s: %s", to.p_path, strerror(errno));
/*
if (utimes(to.p_path, tv))
err("utimes: %s: %s", to.p_path, strerror(errno));
/*