[ovs-dev] [PATCH 2/2] datapath: Use __packed macro.

Jesse Gross jesse at nicira.com
Sun Dec 12 20:49:40 UTC 2010


The __packed macro is preferred instead of an explicit GCC attribute,
so use it instead to deal with structure packing.

Signed-off-by: Jesse Gross <jesse at nicira.com>
---
 datapath/flow.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/datapath/flow.h b/datapath/flow.h
index d58196e..3f9f0ed 100644
--- a/datapath/flow.h
+++ b/datapath/flow.h
@@ -58,7 +58,7 @@ struct arp_eth_header
 	unsigned char       ar_sip[4];		/* sender IP address        */
 	unsigned char       ar_tha[ETH_ALEN];	/* target hardware address  */
 	unsigned char       ar_tip[4];		/* target IP address        */
-} __attribute__((packed));
+} __packed;
 
 int flow_init(void);
 void flow_exit(void);
-- 
1.7.1





More information about the dev mailing list