Description: FTBFS on armel
 Fix fragile memory manipulation preprocessor macros on little endian archs.
Author: Sune Vuorela <debian@pusling.com>
Last-Update: 2010-03-14

--- a/libsrc/Wi/widisk.h
+++ b/libsrc/Wi/widisk.h
@@ -230,12 +230,20 @@ typedef unsigned char * db_buf_t;
 
 #else
 
+// Debian maintainer: armel compatibility
+#if 0
 #define LONG_SET(p, l) \
   *((int32*) (p)) = (l)
+#endif
+static inline void LONG_SET(unsigned char *p, int32 l) { int32 x = l; memcpy(p, &x, 4);  }
 
 
+// Debian maintainer: armel compatibility
+#if 0
 #define LONG_REF(p) \
   (* ((int32*) (p)))
+#endif
+static inline int32 LONG_REF(unsigned char *p) { int32 ret; memcpy(&ret, p, 4); return ret; }
 
 #endif
 
@@ -271,12 +279,20 @@ typedef unsigned char * db_buf_t;
 
 #define UINT32PL(p)  ((unsigned int32*)(p))
 
+// Debian maintainer: armel compatibility
+#if 0
 #define INT64_REF(place) \
   (((int64) (UINT32PL(place)[0])) << 32 | UINT32PL(place)[1])
+#endif
+static inline int64 INT64_REF(unsigned char *p) { int64 ret; memcpy(&ret, p, 8); return ret; }
 
+// Debian maintainer: armel compatibility
+#if 0
 #define INT64_SET(place, v) \
   {((unsigned int32*)(place))[0] = (v) >> 32; \
   ((unsigned int32*)(place))[1] = (int32)(v); }
+#endif
+static inline void INT64_SET(unsigned char *place, int64 v) { int64 x = v; memcpy(place, &x, 8);  }
 
 #endif
 
