Skip to content

Commit bafbc62

Browse files
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 <james@codeconstruct.com.au>
1 parent b287a76 commit bafbc62

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎src/mctp.h‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,29 @@ enum {
109109
#define RTNLGRP_MCTP_IFADDR 34
110110
#endif
111111

112+
#ifndef SIOCMCTPALLOCTAG
113+
#define SIOCMCTPALLOCTAG 0x89E0
114+
#define SIOCMCTPDROPTAG (0x89E0 + 1)
115+
116+
struct mctp_ioc_tag_ctl {
117+
mctp_eid_t peer_addr;
118+
119+
__u8 tag;
120+
__u16 flags;
121+
};
122+
#endif
123+
124+
#ifndef SIOCMCTPALLOCTAG2
125+
#define SIOCMCTPALLOCTAG2 (0x89E0 + 2)
126+
#define SIOCMCTPDROPTAG2 (0x89E0 + 3)
127+
128+
struct mctp_ioc_tag_ctl2 {
129+
unsigned int net;
130+
mctp_eid_t peer_addr;
131+
mctp_eid_t local_addr;
132+
__u16 flags;
133+
__u8 tag;
134+
};
135+
#endif
136+
112137
#endif /* _MCTP_H */

‎tests/mctp-ops-test.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <sys/socket.h>
2121
#include <sys/un.h>
2222

23+
#include <linux/if.h>
2324
#include <linux/netlink.h>
2425

2526
#include "mctp-ops.h"

0 commit comments

Comments
 (0)