diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-15 02:28:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-15 02:28:56 +0100 |
commit | 389cca4b9ed07be8d873b2aae01f3eb0c3474f7c (patch) | |
tree | 4ec81672d1bd6b18578576b876659d6a257ca5ae /libbb | |
parent | a307af1af62c51e33e2801d74dbc35560af0fc0e (diff) | |
download | busybox-w32-389cca4b9ed07be8d873b2aae01f3eb0c3474f7c.tar.gz busybox-w32-389cca4b9ed07be8d873b2aae01f3eb0c3474f7c.tar.bz2 busybox-w32-389cca4b9ed07be8d873b2aae01f3eb0c3474f7c.zip |
some non-gnu compilers can't have non-const struct initializers
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/copy_file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index a96691b24..adcfe2111 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) | |||
374 | /* Cannot happen: */ | 374 | /* Cannot happen: */ |
375 | /* && !(flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) */ | 375 | /* && !(flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) */ |
376 | ) { | 376 | ) { |
377 | struct timeval times = {.tv_sec = source_stat.st_mtime, | 377 | struct timeval times; |
378 | .tv_usec = 0}; | 378 | |
379 | times.tv_sec = source_stat.st_mtime; | ||
380 | times.tv_usec = 0; | ||
379 | /* BTW, utimes sets usec-precision time - just FYI */ | 381 | /* BTW, utimes sets usec-precision time - just FYI */ |
380 | if (utimes(dest, ×) < 0) | 382 | if (utimes(dest, ×) < 0) |
381 | bb_perror_msg("can't preserve %s of '%s'", "times", dest); | 383 | bb_perror_msg("can't preserve %s of '%s'", "times", dest); |