summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-16 07:50:33 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-16 07:50:33 +0000
commit158d982669d3d05079da2b9cc8d8fcd8adf35a4b (patch)
tree038bcb1def910a55323b86f5ee12bad2839161a5 /src/install.c
parent3ecd35f56fbb7f9b3f43cd12f862336acf7dca56 (diff)
downloadcoreutils-158d982669d3d05079da2b9cc8d8fcd8adf35a4b.tar.xz
Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/install.c b/src/install.c
index 49cc8d0ea..4925dc6f8 100644
--- a/src/install.c
+++ b/src/install.c
@@ -35,6 +35,7 @@
#include "mkdir-p.h"
#include "modechange.h"
#include "quote.h"
+#include "stat-time.h"
#include "utimens.h"
#include "xstrtol.h"
@@ -536,10 +537,8 @@ change_timestamps (const char *from, const char *to)
return false;
}
- timespec[0].tv_sec = stb.st_atime;
- timespec[0].tv_nsec = TIMESPEC_NS (stb.st_atim);
- timespec[1].tv_sec = stb.st_mtime;
- timespec[1].tv_nsec = TIMESPEC_NS (stb.st_mtim);
+ timespec[0] = get_stat_atime (&stb);
+ timespec[1] = get_stat_mtime (&stb);
if (utimens (to, timespec))
{
error (0, errno, _("cannot set time stamps for %s"), quote (to));