From 1e980cd9776b27a4251f5b78d4bc87098e55ca07 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Wed, 27 May 2009 23:02:17 +0000 Subject: [PATCH] Fix yellow & red git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21107 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lua/loslib.c | 2 ++ apps/plugins/lua/strftime.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/plugins/lua/loslib.c b/apps/plugins/lua/loslib.c index 9d29e905e1..19fef84a9c 100644 --- a/apps/plugins/lua/loslib.c +++ b/apps/plugins/lua/loslib.c @@ -67,6 +67,7 @@ static void setboolfield (lua_State *L, const char *key, int value) { lua_setfield(L, -2, key); } +#if CONFIG_RTC static int getboolfield (lua_State *L, const char *key) { int res; lua_getfield(L, -1, key); @@ -89,6 +90,7 @@ static int getfield (lua_State *L, const char *key, int d) { lua_pop(L, 1); return res; } +#endif static int os_date (lua_State *L) { diff --git a/apps/plugins/lua/strftime.c b/apps/plugins/lua/strftime.c index df230f7bd0..681d4be1cf 100644 --- a/apps/plugins/lua/strftime.c +++ b/apps/plugins/lua/strftime.c @@ -80,7 +80,13 @@ again: case 'U': no = (tm->tm_yday - tm->tm_wday + 7) / 7; goto _no; case 'W': no = (tm->tm_yday - (tm->tm_wday - 1 + 7) % 7 + 7) / 7; goto _no; case 's': { - time_t t = rb->mktime((struct tm*)tm); + time_t t = +#if CONFIG_RTC + rb->mktime((struct tm*)tm) +#else + 0 +#endif + ; char buf[101]; char* c; buf[100]=0;