diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-03-16 23:47:03 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-03-16 23:47:03 +0000 |
commit | 2c7b127dd77564a8ca8c384d7d1abed441efe110 (patch) | |
tree | 95353f6db63c676890176f26fb9f452e8050d547 /apps/scrobbler.c | |
parent | c0351ca6338075461565b7ba14b01ba3cabb3f1e (diff) | |
download | rockbox-2c7b127dd77564a8ca8c384d7d1abed441efe110.tar.gz rockbox-2c7b127dd77564a8ca8c384d7d1abed441efe110.zip |
Set CONFIG_RTC to 0 for non-RTC targets, and check with #if to profit from -Wundef. No code change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/scrobbler.c')
-rw-r--r-- | apps/scrobbler.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/scrobbler.c b/apps/scrobbler.c index a339429cab..07ba016a51 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c | |||
@@ -32,7 +32,7 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging | |||
32 | #include "settings.h" | 32 | #include "settings.h" |
33 | #include "ata_idle_notify.h" | 33 | #include "ata_idle_notify.h" |
34 | 34 | ||
35 | #ifdef CONFIG_RTC | 35 | #if CONFIG_RTC |
36 | #include "time.h" | 36 | #include "time.h" |
37 | #include "timefuncs.h" | 37 | #include "timefuncs.h" |
38 | #endif | 38 | #endif |
@@ -41,7 +41,7 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging | |||
41 | 41 | ||
42 | #define SCROBBLER_VERSION "1.0" | 42 | #define SCROBBLER_VERSION "1.0" |
43 | 43 | ||
44 | #ifdef CONFIG_RTC | 44 | #if CONFIG_RTC |
45 | #define SCROBBLER_FILE "/.scrobbler.log" | 45 | #define SCROBBLER_FILE "/.scrobbler.log" |
46 | #else | 46 | #else |
47 | #define SCROBBLER_FILE "/.scrobbler-timeless.log" | 47 | #define SCROBBLER_FILE "/.scrobbler-timeless.log" |
@@ -62,7 +62,7 @@ static struct mp3entry scrobbler_entry; | |||
62 | static bool pending = false; | 62 | static bool pending = false; |
63 | static bool scrobbler_initialised = false; | 63 | static bool scrobbler_initialised = false; |
64 | static bool scrobbler_ata_callback = false; | 64 | static bool scrobbler_ata_callback = false; |
65 | #ifdef CONFIG_RTC | 65 | #if CONFIG_RTC |
66 | static time_t timestamp; | 66 | static time_t timestamp; |
67 | #else | 67 | #else |
68 | static unsigned long timestamp; | 68 | static unsigned long timestamp; |
@@ -92,7 +92,7 @@ static void write_cache(void) | |||
92 | { | 92 | { |
93 | fdprintf(scrobbler_fd, "#AUDIOSCROBBLER/%s\n", SCROBBLER_VERSION); | 93 | fdprintf(scrobbler_fd, "#AUDIOSCROBBLER/%s\n", SCROBBLER_VERSION); |
94 | fdprintf(scrobbler_fd, "#TZ/UNKNOWN\n"); | 94 | fdprintf(scrobbler_fd, "#TZ/UNKNOWN\n"); |
95 | #ifdef CONFIG_RTC | 95 | #if CONFIG_RTC |
96 | fdprintf(scrobbler_fd, | 96 | fdprintf(scrobbler_fd, |
97 | "#CLIENT/Rockbox " TARGET_NAME SCROBBLER_REVISION "\n"); | 97 | "#CLIENT/Rockbox " TARGET_NAME SCROBBLER_REVISION "\n"); |
98 | #else | 98 | #else |
@@ -207,7 +207,7 @@ void scrobbler_change_event(struct mp3entry *id) | |||
207 | { | 207 | { |
208 | logf("SCROBBLER: add pending"); | 208 | logf("SCROBBLER: add pending"); |
209 | copy_mp3entry(&scrobbler_entry, id); | 209 | copy_mp3entry(&scrobbler_entry, id); |
210 | #ifdef CONFIG_RTC | 210 | #if CONFIG_RTC |
211 | timestamp = mktime(get_time()); | 211 | timestamp = mktime(get_time()); |
212 | #else | 212 | #else |
213 | timestamp = 0; | 213 | timestamp = 0; |