diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch b/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch new file mode 100644 index 000000000..4d0594cb6 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch @@ -0,0 +1,49 @@ +From 702dd20f43d9ca7e0bcb917e8acfec3f1acdcb5c Mon Sep 17 00:00:00 2001 +From: Aaron Conole <aconole@redhat.com> +Date: Mon, 3 Aug 2020 15:14:50 -0400 +Subject: [PATCH 3/9] lldp: add packed struct definition + +Signed-off-by: Aaron Conole <aconole@redhat.com> +--- + include/lldp.h | 6 ++++++ + lldp/l2_packet.h | 5 ++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/include/lldp.h b/include/lldp.h +index fb5ee93..de6a4ad 100644 +--- a/include/lldp.h ++++ b/include/lldp.h +@@ -255,5 +255,11 @@ enum { + #define LLDP_EVB_DEFAULT_RTE 15 + #define LLDP_EVB_DEFAULT_MAX_RTE 31 + ++#ifndef _MSC_VER ++#define STRUCT_PACKED(STRUCT) STRUCT __attribute__((__packed__)) ++#else ++#define STRUCT_PACKED(STRUCT) __pragma(pack(push, 1)) STRUCT __pragma(pack(pop)) ++#endif ++ + void somethingChangedLocal(const char *ifname, int type); + #endif /* _LLDP_H */ +diff --git a/lldp/l2_packet.h b/lldp/l2_packet.h +index 607b8a3..831958c 100644 +--- a/lldp/l2_packet.h ++++ b/lldp/l2_packet.h +@@ -58,12 +58,11 @@ + */ + struct l2_packet_data; + +- +-struct l2_ethhdr { ++STRUCT_PACKED(struct l2_ethhdr { + u8 h_dest[ETH_ALEN]; + u8 h_source[ETH_ALEN]; + u16 h_proto; +-} STRUCT_PACKED; ++}); + + /** + * l2_packet_init - Initialize l2_packet interface +-- +2.28.0 + |