--- a/src/lib/getuint32.h +++ a/src/lib/getuint32.h @@ -1,12 +1,20 @@ #ifndef _SD_GET_UINT32_H_ #define _SD_GET_UINT32_H_ +#if defined(ARM) || defined(__sparc__) +#include +#endif -#ifdef ARM +#if defined(ARM) || defined(__sparc__) static inline guint32 get_uint32(const gchar *addr) { - guint32 result; - memcpy(&result, addr, sizeof(guint32)); - return result; + if (((addr - (char *)0) & 3) == 0) { + /* already aligned properly */ + return *reinterpret_cast(addr); + } else { + guint32 result; + memcpy(&result, addr, sizeof(guint32)); + return result; + } } #else #define get_uint32(x) *reinterpret_cast(x) --- a/src/lib/stddict.cpp +++ a/src/lib/stddict.cpp @@ -358,6 +358,11 @@ MapFile* cache_file::get_cache_loadfile(const gchar *filename, const std::string bool cache_file::load_cache(const std::string& url, const std::string& saveurl, CollateFunctions cltfunc, glong filedatasize) { +#if defined(ARM) || defined(__sparc__) + /* XXX: remove this after cache loading has been fixed to align the + * loaded data */ + return false; +#endif std::string oftfilename; if (cachefiletype == CacheFileType_oft) oftfilename=saveurl+".oft";