|
From: | Zhenwei Chu |
Subject: | [lwip-devel] [bug #26134] Insert a dummy u16_t field to prevent alignment exceptions |
Date: | Thu, 09 Apr 2009 14:06:55 +0000 |
User-agent: | Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) |
URL: <http://savannah.nongnu.org/bugs/?26134> Summary: Insert a dummy u16_t field to prevent alignment exceptions Project: lwIP - A Lightweight TCP/IP stack Submitted by: blackfin Submitted on: Thu 09 Apr 2009 02:06:54 PM GMT Category: None Severity: 3 - Normal Item Group: Change Request Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: lwIP version: 1.3.0 _______________________________________________________ Details: Insert a dummy u16_t field to prevent alignment exceptions Files Changed: Etharp.h: line75 From: PACK_STRUCT_BEGIN struct eth_hdr { #if ETH_PAD_SIZE PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]); #endif PACK_STRUCT_FIELD(struct eth_addr dest); PACK_STRUCT_FIELD(struct eth_addr src); PACK_STRUCT_FIELD(u16_t type); } PACK_STRUCT_STRUCT; PACK_STRUCT_END To: PACK_STRUCT_BEGIN struct eth_hdr { #ifdef ETH_PAD_SIZE PACK_STRUCT_FIELD(u8_t padding[ETH_PAD_SIZE]); #else /* insert a dummy u16_t field to prevent alignment exceptions */ PACK_STRUCT_FIELD(u16_t unused1); #endif PACK_STRUCT_FIELD(struct eth_addr dest); PACK_STRUCT_FIELD(struct eth_addr src); PACK_STRUCT_FIELD(u16_t type); } PACK_STRUCT_STRUCT; PACK_STRUCT_END _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26134> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |