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.
diff --git a/firmware/target/hosted/rtc.c b/firmware/target/hosted/rtc.c
index c5bf981..178e797 100644
--- a/firmware/target/hosted/rtc.c
+++ b/firmware/target/hosted/rtc.c
@@ -22,11 +22,12 @@
****************************************************************************/
#include <time.h>
#include <sys/time.h>
+#if !defined(WIN32)
#include <sys/ioctl.h>
#include <linux/rtc.h>
#include <fcntl.h>
#include <unistd.h>
-
+#endif
void rtc_init(void)
{
}
@@ -41,12 +42,12 @@
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;