summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/target/hosted/rtc.c7
1 files 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 <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_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;