From 796bd20d5b2046ef44ff06091332871349265b8b Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 27 Oct 2025 10:43:56 +0800 Subject: [PATCH 1/2] mctp-bench: remove prctl includes Khem reports that including both linux/prctl.h and sys/prctl.h appears to break builds with musl: In file included from ../sources/mctp-2.3/src/mctp-bench.c:16: ../recipe-sysroot/usr/include/sys/prctl.h:88:8: error: redefinition of 'prctl_mm_map' 88 | struct prctl_mm_map { | ^ ../recipe-sysroot/usr/include/linux/prctl.h:134:8: note: previous definition is here 134 | struct prctl_mm_map { | ^ We're not using prctl() at present, so both can be removed. Reported-by: Khem Raj Signed-off-by: Jeremy Kerr --- CHANGELOG.md | 4 ++++ src/mctp-bench.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ed04e5..29dca80e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed + +1. Fixed `mctp-bench` compile on musl libc + ## [2.3] - 2025-10-22 ### Fixed diff --git a/src/mctp-bench.c b/src/mctp-bench.c index 404e142a..ada87744 100644 --- a/src/mctp-bench.c +++ b/src/mctp-bench.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include From 76e31c425719f0f67f45712fd2ef3a13a88eaaa7 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 27 Oct 2025 10:49:59 +0800 Subject: [PATCH 2/2] mctp-bench: Add SPDX & file headers, cleanup initial preproc macros Add missing license header, and separate the pre-header define. Signed-off-by: Jeremy Kerr --- src/mctp-bench.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mctp-bench.c b/src/mctp-bench.c index ada87744..a02030ef 100644 --- a/src/mctp-bench.c +++ b/src/mctp-bench.c @@ -1,4 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * mctp-bench: small MCTP benchmarking utility + * + * Copyright (c) 2024-2025 Code Construct + */ + #define _XOPEN_SOURCE 700 + #include #include #include