[RFC PATCH] samples: mei: Fix building on musl libc

From: Brahmajit Das
Date: Mon Jun 30 2025 - 16:44:50 EST


The header bits/wordsize.h is glibc specific and on building on musl
with allyesconfig results in

samples/mei/mei-amt-version.c:77:10: fatal error: bits/wordsize.h: No such file or directory
77 | #include <bits/wordsize.h>
| ^~~~~~~~~~~~~~~~~

mei-amt-version.c build file without bits/wordsize.h on musl. I'm not
sure we can remove the header completely or how it's used under glibc.

Signed-off-by: Brahmajit Das <listout@xxxxxxxxxxx>
---
samples/mei/mei-amt-version.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/samples/mei/mei-amt-version.c b/samples/mei/mei-amt-version.c
index 867debd3b912..c6850f7b883a 100644
--- a/samples/mei/mei-amt-version.c
+++ b/samples/mei/mei-amt-version.c
@@ -73,7 +73,9 @@
#include <errno.h>
#include <stdint.h>
#include <stdbool.h>
+#if defined(__GLIBC__)
#include <bits/wordsize.h>
+#endif
#include <linux/mei.h>

/*****************************************************************************
--
2.50.0