summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-11-20 21:47:39 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-11-20 21:47:39 +0000
commitb6378e07d7b5406391669627e23080abdc797a1b (patch)
tree8be0ed3f1b9136d6ad3cb3e888d518389bbbe9ed /include
parentcab2253d34ce1caf383147fd1c2970233b1e45af (diff)
Revert code in error and include the gcc suggested workaround for the original problem, while gcc investigates.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/unaligned.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/asterisk/unaligned.h b/include/asterisk/unaligned.h
index 4737c4ec9..63f430f89 100644
--- a/include/asterisk/unaligned.h
+++ b/include/asterisk/unaligned.h
@@ -50,16 +50,9 @@ static inline unsigned short get_unaligned_uint16(const void *p)
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)