From 1bc7e525a2fe5d0c8e4521cd53db2e371dd15f67 Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 18 Aug 2026 16:02:34 +0800 Subject: [PATCH] headers: update for compatibility with toolchain headers down to 5.15 Found that many distro build toolchains use outdated kernel headers. Explicitly add linux/if.h to mctp-ops-test.c, and add missing linux/mctp.h definitions if undefined. Signed-off-by: James Lee --- src/mctp.h | 24 ++++++++++++++++++++++++ tests/mctp-ops-test.c | 1 + 2 files changed, 25 insertions(+) diff --git a/src/mctp.h b/src/mctp.h index 0641b4c4..c8ab35ee 100644 --- a/src/mctp.h +++ b/src/mctp.h @@ -109,4 +109,28 @@ enum { #define RTNLGRP_MCTP_IFADDR 34 #endif +#ifndef SIOCMCTPALLOCTAG +#define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0) +#define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1) + +struct mctp_ioc_tag_ctl { + mctp_eid_t peer_addr; + __u8 tag; + __u16 flags; +}; +#endif + +#ifndef SIOCMCTPALLOCTAG2 +#define SIOCMCTPALLOCTAG2 (SIOCPROTOPRIVATE + 2) +#define SIOCMCTPDROPTAG2 (SIOCPROTOPRIVATE + 3) + +struct mctp_ioc_tag_ctl2 { + unsigned int net; + mctp_eid_t peer_addr; + mctp_eid_t local_addr; + __u16 flags; + __u8 tag; +}; +#endif + #endif /* _MCTP_H */ diff --git a/tests/mctp-ops-test.c b/tests/mctp-ops-test.c index 80cff5a2..30353cfa 100644 --- a/tests/mctp-ops-test.c +++ b/tests/mctp-ops-test.c @@ -20,6 +20,7 @@ #include #include +#include #include #include "mctp-ops.h"