summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiveboxAndy <liveboxandy@gmail.com>2018-11-17 10:31:50 +0000
committerFranklin Wei <git@fwei.tk>2019-07-26 20:11:33 -0400
commitd462d26ff0fb382af5edd1af1ff752ca17e72a14 (patch)
tree99821272fc2854f1b7f98104154b50703acc3750
parentc8ec64ed27f354f6fa438d9f03935744346fff09 (diff)
downloadrockbox-d462d26ff0fb382af5edd1af1ff752ca17e72a14.tar.gz
rockbox-d462d26ff0fb382af5edd1af1ff752ca17e72a14.zip
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.
-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 @@
22 ****************************************************************************/ 22 ****************************************************************************/
23#include <time.h> 23#include <time.h>
24#include <sys/time.h> 24#include <sys/time.h>
25#if !defined(WIN32)
25#include <sys/ioctl.h> 26#include <sys/ioctl.h>
26#include <linux/rtc.h> 27#include <linux/rtc.h>
27#include <fcntl.h> 28#include <fcntl.h>
28#include <unistd.h> 29#include <unistd.h>
29 30#endif
30void rtc_init(void) 31void rtc_init(void)
31{ 32{
32} 33}
@@ -41,12 +42,12 @@ int rtc_read_datetime(struct tm *tm)
41 42
42int rtc_write_datetime(const struct tm *tm) 43int rtc_write_datetime(const struct tm *tm)
43{ 44{
44#if defined(AGPTEK_ROCKER) 45#if defined(AGPTEK_ROCKER) && !defined(WIN32)
45 struct timeval tv; 46 struct timeval tv;
46 struct tm *tm_time; 47 struct tm *tm_time;
47 48
48 int rtc = open("/dev/rtc0", O_WRONLY); 49 int rtc = open("/dev/rtc0", O_WRONLY);
49 50
50 tv.tv_sec = mktime((struct tm *)tm); 51 tv.tv_sec = mktime((struct tm *)tm);
51 tv.tv_usec = 0; 52 tv.tv_usec = 0;
52 53