diff options
| -rw-r--r-- | meta-networking/recipes-support/mctp/mctp/0001-build-Adjust-for-kernel-mctp.h.patch | 84 | ||||
| -rw-r--r-- | meta-networking/recipes-support/mctp/mctp_git.bb | 8 |
2 files changed, 90 insertions, 2 deletions
diff --git a/meta-networking/recipes-support/mctp/mctp/0001-build-Adjust-for-kernel-mctp.h.patch b/meta-networking/recipes-support/mctp/mctp/0001-build-Adjust-for-kernel-mctp.h.patch new file mode 100644 index 0000000000..83bf197703 --- /dev/null +++ b/meta-networking/recipes-support/mctp/mctp/0001-build-Adjust-for-kernel-mctp.h.patch | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | From 653eccc918ef993186c312694c288b2a5b39248e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 5 Nov 2021 13:14:55 -0700 | ||
| 4 | Subject: [PATCH] build: Adjust for kernel mctp.h | ||
| 5 | |||
| 6 | Starting 5.15 kernel has mctp.h as well and provides some of the | ||
| 7 | defintions, therefore move the ones we need to provide in this header | ||
| 8 | outside the conditional check so its always provided regardless of | ||
| 9 | header coming from kernel or not. | ||
| 10 | |||
| 11 | Include linux/if_link.h so it can pre-define IFLA_MCTP_UNSPEC and other | ||
| 12 | defines and there is a check for conditionally providing them here but | ||
| 13 | kernel does not have such a check, so if linux/if_link.h is included | ||
| 14 | after this header then we end up with duplicate defines | ||
| 15 | |||
| 16 | linux/if_link.h:1267:2: error: redefinition of enumerator 'IFLA_MCTP_UNSPEC' | ||
| 17 | IFLA_MCTP_UNSPEC, | ||
| 18 | ^ | ||
| 19 | ../git/src/mctp.h:74:2: note: previous definition is here | ||
| 20 | IFLA_MCTP_UNSPEC, | ||
| 21 | ^ | ||
| 22 | |||
| 23 | Upstream-Status: Submitted [https://github.com/CodeConstruct/mctp/pull/2] | ||
| 24 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 25 | --- | ||
| 26 | src/mctp.h | 21 +++++++++++---------- | ||
| 27 | 1 file changed, 11 insertions(+), 10 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/src/mctp.h b/src/mctp.h | ||
| 30 | index 4f73def..e602168 100644 | ||
| 31 | --- a/src/mctp.h | ||
| 32 | +++ b/src/mctp.h | ||
| 33 | @@ -19,6 +19,7 @@ | ||
| 34 | #if HAVE_LINUX_MCTP_H | ||
| 35 | #include <linux/mctp.h> | ||
| 36 | #endif | ||
| 37 | +#include <linux/if_link.h> | ||
| 38 | |||
| 39 | #ifndef AF_MCTP | ||
| 40 | #define AF_MCTP 45 | ||
| 41 | @@ -33,10 +34,6 @@ | ||
| 42 | |||
| 43 | #ifndef MCTP_NET_ANY | ||
| 44 | |||
| 45 | -#ifndef MAX_ADDR_LEN | ||
| 46 | -#define MAX_ADDR_LEN 32 | ||
| 47 | -#endif | ||
| 48 | - | ||
| 49 | typedef uint8_t mctp_eid_t; | ||
| 50 | |||
| 51 | struct mctp_addr { | ||
| 52 | @@ -53,6 +50,16 @@ struct sockaddr_mctp { | ||
| 53 | uint8_t __smctp_pad1; | ||
| 54 | }; | ||
| 55 | |||
| 56 | +#define MCTP_NET_ANY 0 | ||
| 57 | +#define MCTP_ADDR_ANY 0xff | ||
| 58 | +#define MCTP_TAG_OWNER 0x08 | ||
| 59 | + | ||
| 60 | +#endif /* MCTP_NET_ANY */ | ||
| 61 | + | ||
| 62 | +#ifndef MAX_ADDR_LEN | ||
| 63 | +#define MAX_ADDR_LEN 32 | ||
| 64 | +#endif | ||
| 65 | + | ||
| 66 | struct sockaddr_mctp_ext { | ||
| 67 | struct sockaddr_mctp smctp_base; | ||
| 68 | int smctp_ifindex; | ||
| 69 | @@ -61,12 +68,6 @@ struct sockaddr_mctp_ext { | ||
| 70 | unsigned char smctp_haddr[MAX_ADDR_LEN]; | ||
| 71 | }; | ||
| 72 | |||
| 73 | -#define MCTP_NET_ANY 0 | ||
| 74 | -#define MCTP_ADDR_ANY 0xff | ||
| 75 | -#define MCTP_TAG_OWNER 0x08 | ||
| 76 | - | ||
| 77 | -#endif /* MCTP_NET_ANY */ | ||
| 78 | - | ||
| 79 | #ifndef IFLA_MCTP_MAX | ||
| 80 | |||
| 81 | /* From if_link.h */ | ||
| 82 | -- | ||
| 83 | 2.33.1 | ||
| 84 | |||
diff --git a/meta-networking/recipes-support/mctp/mctp_git.bb b/meta-networking/recipes-support/mctp/mctp_git.bb index ebfa84d893..50d84d204d 100644 --- a/meta-networking/recipes-support/mctp/mctp_git.bb +++ b/meta-networking/recipes-support/mctp/mctp_git.bb | |||
| @@ -5,9 +5,13 @@ LICENSE = "GPLv2" | |||
| 5 | 5 | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4cc91856b08b094b4f406a29dc61db21" |
| 7 | 7 | ||
| 8 | SRCREV = "a8658290b7914f67146a982671b09f2270ba1654" | 8 | PV = "0.1+git${SRCPV}" |
| 9 | 9 | ||
| 10 | SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https" | 10 | SRCREV = "072bafe725c50329f99cf9d3b2624e8799e8163a" |
| 11 | |||
| 12 | SRC_URI = "git://github.com/CodeConstruct/mctp;branch=main;protocol=https \ | ||
| 13 | file://0001-build-Adjust-for-kernel-mctp.h.patch \ | ||
| 14 | " | ||
| 11 | 15 | ||
| 12 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 13 | 17 | ||
