From 389cca4b9ed07be8d873b2aae01f3eb0c3474f7c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 15 Nov 2009 02:28:56 +0100 Subject: some non-gnu compilers can't have non-const struct initializers Signed-off-by: Denys Vlasenko --- libbb/copy_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libbb') 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) /* 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, ×) < 0) bb_perror_msg("can't preserve %s of '%s'", "times", dest); -- cgit v1.2.3