[asterisk-commits] tilghman: trunk r230697 - /trunk/include/asterisk/unaligned.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Nov 20 15:47:40 CST 2009
Author: tilghman
Date: Fri Nov 20 15:47:39 2009
New Revision: 230697
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=230697
Log:
Revert code in error and include the gcc suggested workaround for the original problem, while gcc investigates.
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=230697&r1=230696&r2=230697
==============================================================================
--- trunk/include/asterisk/unaligned.h (original)
+++ trunk/include/asterisk/unaligned.h Fri Nov 20 15:47:39 2009
@@ -50,16 +50,9 @@
static inline void put_unaligned_uint64(void *p, uint64_t datum)
{
- unsigned char *cp = p;
+ struct { unsigned int d; } __attribute__((packed,may_alias)) *pp = p;
- 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;
+ pp->d = datum;
}
static inline void put_unaligned_uint32(void *p, unsigned int datum)
More information about the asterisk-commits
mailing list