From e097b5fd62bcbd4469ee31544c77bab4902cbe05 Mon Sep 17 00:00:00 2001 From: Marcoen Hirschberg Date: Sat, 16 Jun 2007 18:40:07 +0000 Subject: [PATCH] fix build for big-endian targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13638 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata/metadata_common.c | 4 +--- apps/metadata/metadata_common.h | 4 ++++ 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) } /* Read an unsigned 32-bit integer from a big-endian file. */ -#ifdef ROCKBOX_BIG_ENDIAN -#define read_uint32be(fd,buf) read((fd), (buf), 4) -#else +#ifdef ROCKBOX_LITTLE_ENDIAN int read_uint32be(int fd, unsigned int* buf) { 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, bool skip_id3v2(int fd, struct mp3entry *id3); long read_string(int fd, char* buf, long buf_size, int eos, long size); +#ifdef ROCKBOX_BIG_ENDIAN +#define read_uint32be(fd,buf) read((fd), (buf), 4) +#else int read_uint32be(int fd, unsigned int* buf); +#endif unsigned long get_long_le(void* buf); unsigned short get_short_le(void* buf); unsigned long get_long_be(void* buf);