*/
#include <sys/utsname.h>
-#include <getopt.h>
#include "libbb.h"
#include "rtc_.h"
struct tm tm;
int rtc = rtc_xopen(&rtcname, O_WRONLY);
- tm = *(utc ? gmtime(&t) : localtime(&t));
+ if (utc)
+ gmtime_r(&t, &tm);
+ else
+ localtime_r(&t, &tm);
tm.tm_isdst = 0;
xioctl(rtc, RTC_SET_TIME, &tm);
#define HWCLOCK_OPT_RTCFILE 0x20
int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int hwclock_main(int argc, char **argv)
+int hwclock_main(int argc UNUSED_PARAM, char **argv)
{
unsigned opt;
int utc;