[asterisk-commits] tilghman: trunk r227824 - /trunk/include/asterisk/unaligned.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 4 14:35:28 CST 2009
Author: tilghman
Date: Wed Nov 4 14:35:24 2009
New Revision: 227824
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=227824
Log:
Fixes for gcc 4.4
Modified:
trunk/include/asterisk/unaligned.h
Modified: trunk/include/asterisk/unaligned.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/unaligned.h?view=diff&rev=227824&r1=227823&r2=227824
==============================================================================
--- trunk/include/asterisk/unaligned.h (original)
+++ trunk/include/asterisk/unaligned.h Wed Nov 4 14:35:24 2009
@@ -50,9 +50,16 @@
static inline void put_unaligned_uint64(void *p, uint64_t datum)
{
- struct { uint64_t d; } __attribute__((packed)) *pp = p;
+ unsigned char *cp = p;
- pp->d = datum;
+ cp[0] = (datum >> 56) & 0xff;
+ cp[1] = (datum >> 48) & 0xff;
+ cp[2] = (datum >> 40) & 0xff;
+ cp[3] = (datum >> 32) & 0xff;
+ cp[4] = (datum >> 24) & 0xff;
+ cp[5] = (datum >> 16) & 0xff;
+ cp[6] = (datum >> 8) & 0xff;
+ cp[7] = (datum >> 0) & 0xff;
}
static inline void put_unaligned_uint32(void *p, unsigned int datum)
More information about the asterisk-commits
mailing list