From d462d26ff0fb382af5edd1af1ff752ca17e72a14 Mon Sep 17 00:00:00 2001 From: LiveboxAndy Date: Sat, 17 Nov 2018 10:31:50 +0000 Subject: [PATCH] Fix issue with building the UI Simulator for Windows Addition of rtc support for AGPtEK ROCKER broke building the UI Simulator for Windows. This patch removes the rtc support if building UI Simulator for Windows. --- firmware/target/hosted/rtc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/target/hosted/rtc.c b/firmware/target/hosted/rtc.c index c5bf9816a9..178e797a8d 100644 --- a/firmware/target/hosted/rtc.c +++ b/firmware/target/hosted/rtc.c @@ -22,11 +22,12 @@ ****************************************************************************/ #include #include +#if !defined(WIN32) #include #include #include #include - +#endif void rtc_init(void) { } @@ -41,12 +42,12 @@ int rtc_read_datetime(struct tm *tm) int rtc_write_datetime(const struct tm *tm) { -#if defined(AGPTEK_ROCKER) +#if defined(AGPTEK_ROCKER) && !defined(WIN32) struct timeval tv; struct tm *tm_time; int rtc = open("/dev/rtc0", O_WRONLY); - + tv.tv_sec = mktime((struct tm *)tm); tv.tv_usec = 0;