fix codes might break strict-aliasing rules
@@ -461,10 +461,15 @@ swap8b(void *dst, const void *src)
op = (uint32_t*)((char*)dst+4);
*op = SWAP4(*op);
#else
+ uint64_t tmp = *(uint64_t*)src;
+ tmp = SWAP8(tmp);
+ memcpy(dst, &tmp, 8);
+
+ /* Codes below will cause "break strict-aliasing rules" in gcc
uint64_t *op = (uint64_t*)dst;
- /* copy over, make the below swap in-place */
*op = *(uint64_t*)src;
*op = SWAP8(*op);
+ */
#endif
#if 0
