Add a patch to use __attribute__((packed)) to replace __packed to avoid multiple definition build error with gcc10.
Signed-off-by: Chen Qi <[email protected]> --- ...attribute__-packed-instead-of-__pack.patch | 30 +++++++++++++++++++ .../recipes-cgl/ucarp/ucarp_1.5.2.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-cgl-common/recipes-cgl/ucarp/ucarp/0001-ip_carp.h-use-__attribute__-packed-instead-of-__pack.patch diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp/0001-ip_carp.h-use-__attribute__-packed-instead-of-__pack.patch b/meta-cgl-common/recipes-cgl/ucarp/ucarp/0001-ip_carp.h-use-__attribute__-packed-instead-of-__pack.patch new file mode 100644 index 0000000..918fa9b --- /dev/null +++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp/0001-ip_carp.h-use-__attribute__-packed-instead-of-__pack.patch @@ -0,0 +1,30 @@ +From a1c83bc4676dbeaff0e1c540aeeb7c31e17aae74 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Thu, 24 Sep 2020 14:20:58 +0800 +Subject: [PATCH] ip_carp.h: use __attribute__((packed)) instead of __packed + +Fix gcc10 build error about multiple definition of __packed. + +Upstream-Status: Pending + +Signed-off-by: Chen Qi <[email protected]> +--- + src/ip_carp.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ip_carp.h b/src/ip_carp.h +index 9504a8e..d1e3368 100644 +--- a/src/ip_carp.h ++++ b/src/ip_carp.h +@@ -70,7 +70,7 @@ struct carp_header { + u_int16_t carp_cksum; + u_int32_t carp_counter[2]; + unsigned char carp_md[20]; /* SHA1 HMAC */ +-} __packed; ++} __attribute__((packed)); + + #define CARP_DFLTTL 255 + +-- +2.17.1 + diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb b/meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb index d17baa0..62ccd11 100644 --- a/meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb +++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp_1.5.2.bb @@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=278a886e91f2f6c983ffdf040130cdc6" SRC_URI = "http://download.pureftpd.org/pub/ucarp/${BPN}-${PV}.tar.gz \ file://ucarp-configure-sha1.patch \ file://ucarp-configure-snprintf.patch \ + file://0001-ip_carp.h-use-__attribute__-packed-instead-of-__pack.patch \ file://ucarp.init \ file://vip-001.conf.example \ file://vip-common.conf \ -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#50801): https://lists.yoctoproject.org/g/yocto/message/50801 Mute This Topic: https://lists.yoctoproject.org/mt/77052201/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
