Align the message buffer to eight bytes.
The 'struct ptp_message" includes a 64 bit integer field, ts.pdu.sec, and this must be aligned to an eight byte boundary for armv5 machines. Although the compiler puts the field at the right offset, we spoil this by packing the struct with 20 bytes of head room. This patch fixes the issue by realigning the message buffer. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
48aa6712a9
commit
1ff9d0d0d2
4
msg.c
4
msg.c
|
@ -32,9 +32,9 @@
|
|||
#define VERSION 0x02
|
||||
|
||||
/*
|
||||
* Head room fits a VLAN Ethernet header, and 'msg' is 32 bit aligned.
|
||||
* Head room fits a VLAN Ethernet header, and 'msg' is 64 bit aligned.
|
||||
*/
|
||||
#define MSG_HEADROOM 20
|
||||
#define MSG_HEADROOM 24
|
||||
|
||||
struct message_storage {
|
||||
unsigned char reserved[MSG_HEADROOM];
|
||||
|
|
Loading…
Reference in New Issue