# HG changeset patch # User Sebastien Decugis # Date 1342125452 -7200 # Node ID 0f566e55081321b9e33f4984d0e9b113bdd70bdb # Parent 42fa209a8cc4890d04e1f0b15a46216ca3619c06 improved the previous fix... not sure it was correct diff -r 42fa209a8cc4 -r 0f566e550813 libfdproto/messages.c --- a/libfdproto/messages.c Thu Jul 12 22:31:20 2012 +0200 +++ b/libfdproto/messages.c Thu Jul 12 22:37:32 2012 +0200 @@ -1326,8 +1326,7 @@ /* The location is not on 64b boundary, so we split the writing in two operations to avoid sigbus */ #define PUT_in_buf_64( _u64data, _bufptr ) { \ uint64_t __v = htonll((uint64_t)(_u64data)); \ - *(uint32_t *)(_bufptr) = (uint32_t)(__v); \ - *(((uint32_t *)(_bufptr))+1) = (uint32_t)(__v >> 32); \ + memcpy(_bufptr, &__v, sizeof(__v)); \ } /* Write a message header in the buffer */