summaryrefslogtreecommitdiff
path: root/libbb/copy_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r--libbb/copy_file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index a96691b..adcfe21 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -374,8 +374,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
/* Cannot happen: */
/* && !(flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) */
) {
- struct timeval times = {.tv_sec = source_stat.st_mtime,
- .tv_usec = 0};
+ struct timeval times;
+
+ times.tv_sec = source_stat.st_mtime;
+ times.tv_usec = 0;
/* BTW, utimes sets usec-precision time - just FYI */
if (utimes(dest, &times) < 0)
bb_perror_msg("can't preserve %s of '%s'", "times", dest);