summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko2009-11-15 02:28:56 +0100
committerDenys Vlasenko2009-11-15 02:28:56 +0100
commit389cca4b9ed07be8d873b2aae01f3eb0c3474f7c (patch)
tree4ec81672d1bd6b18578576b876659d6a257ca5ae /libbb
parenta307af1af62c51e33e2801d74dbc35560af0fc0e (diff)
downloadbusybox-389cca4b9ed07be8d873b2aae01f3eb0c3474f7c.zip
busybox-389cca4b9ed07be8d873b2aae01f3eb0c3474f7c.tar.gz
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.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);