summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Keevil <rkeevil+rockbox@gmail.com>2007-07-14 12:34:52 +0000
committerRobert Keevil <rkeevil+rockbox@gmail.com>2007-07-14 12:34:52 +0000
commitef65d914921f358d275949d1f6d66bbfda3efa74 (patch)
tree566914a2bf0e096c0383f325560c11e29111f389
parent227a733e42d5333b4d10a1b2a77d023fae4d91bb (diff)
downloadrockbox-ef65d914921f358d275949d1f6d66bbfda3efa74.tar.gz
rockbox-ef65d914921f358d275949d1f6d66bbfda3efa74.zip
FS#7353 - mktime() is only used by targets that have an RTC
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13883 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/timefuncs.c2
-rw-r--r--firmware/include/timefuncs.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index d073ec819c..9865b0fe17 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -131,6 +131,7 @@ int set_time(const struct tm *tm)
131#endif 131#endif
132} 132}
133 133
134#if CONFIG_RTC
134/* mktime() code taken from lynx-2.8.5 source, written 135/* mktime() code taken from lynx-2.8.5 source, written
135 by Philippe De Muyter <phdm@macqel.be> */ 136 by Philippe De Muyter <phdm@macqel.be> */
136time_t mktime(struct tm *t) 137time_t mktime(struct tm *t)
@@ -165,3 +166,4 @@ time_t mktime(struct tm *t)
165 result += t->tm_sec; 166 result += t->tm_sec;
166 return(result); 167 return(result);
167} 168}
169#endif
diff --git a/firmware/include/timefuncs.h b/firmware/include/timefuncs.h
index d2f42eb9ff..e266ff9acb 100644
--- a/firmware/include/timefuncs.h
+++ b/firmware/include/timefuncs.h
@@ -27,6 +27,8 @@
27struct tm *get_time(void); 27struct tm *get_time(void);
28int set_time(const struct tm *tm); 28int set_time(const struct tm *tm);
29bool valid_time(const struct tm *tm); 29bool valid_time(const struct tm *tm);
30#if CONFIG_RTC
30time_t mktime(struct tm *t); 31time_t mktime(struct tm *t);
32#endif
31 33
32#endif /* _TIMEFUNCS_H_ */ 34#endif /* _TIMEFUNCS_H_ */