summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/metadata/metadata_common.c4
-rw-r--r--apps/metadata/metadata_common.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c
index 00b03841f9..685b32a25e 100644
--- a/apps/metadata/metadata_common.c
+++ b/apps/metadata/metadata_common.c
@@ -95,9 +95,7 @@ long read_string(int fd, char* buf, long buf_size, int eos, long size)
95} 95}
96 96
97/* Read an unsigned 32-bit integer from a big-endian file. */ 97/* Read an unsigned 32-bit integer from a big-endian file. */
98#ifdef ROCKBOX_BIG_ENDIAN 98#ifdef ROCKBOX_LITTLE_ENDIAN
99#define read_uint32be(fd,buf) read((fd), (buf), 4)
100#else
101int read_uint32be(int fd, unsigned int* buf) 99int read_uint32be(int fd, unsigned int* buf)
102{ 100{
103 size_t n; 101 size_t n;
diff --git a/apps/metadata/metadata_common.h b/apps/metadata/metadata_common.h
index 70e708010d..8041dad5e7 100644
--- a/apps/metadata/metadata_common.h
+++ b/apps/metadata/metadata_common.h
@@ -35,7 +35,11 @@ bool read_vorbis_tags(int fd, struct mp3entry *id3,
35 35
36bool skip_id3v2(int fd, struct mp3entry *id3); 36bool skip_id3v2(int fd, struct mp3entry *id3);
37long read_string(int fd, char* buf, long buf_size, int eos, long size); 37long read_string(int fd, char* buf, long buf_size, int eos, long size);
38#ifdef ROCKBOX_BIG_ENDIAN
39#define read_uint32be(fd,buf) read((fd), (buf), 4)
40#else
38int read_uint32be(int fd, unsigned int* buf); 41int read_uint32be(int fd, unsigned int* buf);
42#endif
39unsigned long get_long_le(void* buf); 43unsigned long get_long_le(void* buf);
40unsigned short get_short_le(void* buf); 44unsigned short get_short_le(void* buf);
41unsigned long get_long_be(void* buf); 45unsigned long get_long_be(void* buf);