diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-16 07:50:33 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-09-16 07:50:33 +0000 |
commit | 158d982669d3d05079da2b9cc8d8fcd8adf35a4b (patch) | |
tree | 038bcb1def910a55323b86f5ee12bad2839161a5 /src/cp.c | |
parent | 3ecd35f56fbb7f9b3f43cd12f862336acf7dca56 (diff) | |
download | coreutils-158d982669d3d05079da2b9cc8d8fcd8adf35a4b.tar.xz |
Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
Diffstat (limited to 'src/cp.c')
-rw-r--r-- | src/cp.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -33,6 +33,7 @@ #include "filenamecat.h" #include "quote.h" #include "quotearg.h" +#include "stat-time.h" #include "utimens.h" #define ASSIGN_BASENAME_STRDUPA(Dest, File_name) \ @@ -304,10 +305,8 @@ re_protect (char const *const_dst_name, size_t src_offset, { struct timespec timespec[2]; - timespec[0].tv_sec = src_sb.st_atime; - timespec[0].tv_nsec = TIMESPEC_NS (src_sb.st_atim); - timespec[1].tv_sec = src_sb.st_mtime; - timespec[1].tv_nsec = TIMESPEC_NS (src_sb.st_mtim); + timespec[0] = get_stat_atime (&src_sb); + timespec[1] = get_stat_mtime (&src_sb); if (utimens (dst_name, timespec)) { |