aboutsummaryrefslogtreecommitdiff
path: root/util-linux/hwclock.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-06 12:47:55 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-06 12:47:55 +0200
commit043b1e5d997d9b582a5aee37bd56e2e4f29be6e4 (patch)
treebab07bc427f178857896a8bf252c61ea1a5c67a2 /util-linux/hwclock.c
parent5370bfb123266ab5716f321e43d3f8f6da7d7143 (diff)
downloadbusybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.tar.gz
busybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.tar.bz2
busybox-w32-043b1e5d997d9b582a5aee37bd56e2e4f29be6e4.zip
more C standard compat fixes from Dan Fandrich
function old new delta docolon 207 204 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/hwclock.c')
-rw-r--r--util-linux/hwclock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 2cdb186c5..6dff57f09 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -7,8 +7,9 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8*/ 8*/
9 9
10#include <sys/utsname.h>
11#include "libbb.h" 10#include "libbb.h"
11/* After libbb.h, since it needs sys/types.h on some systems */
12#include <sys/utsname.h>
12#include "rtc_.h" 13#include "rtc_.h"
13 14
14#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS 15#if ENABLE_FEATURE_HWCLOCK_LONG_OPTIONS
@@ -67,7 +68,10 @@ static void show_clock(int utc)
67static void to_sys_clock(int utc) 68static void to_sys_clock(int utc)
68{ 69{
69 struct timeval tv; 70 struct timeval tv;
70 const struct timezone tz = { timezone/60 - 60*daylight, 0 }; 71 struct timezone tz;
72
73 tz.tz_minuteswest = timezone/60 - 60*daylight;
74 tz.tz_dsttime = 0;
71 75
72 tv.tv_sec = read_rtc(utc); 76 tv.tv_sec = read_rtc(utc);
73 tv.tv_usec = 0; 77 tv.tv_usec = 0;