* [RFC PATCH] samples: mei: Fix building on musl libc
@ 2025-06-30 20:44 Brahmajit Das
2025-07-01 5:13 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Brahmajit Das @ 2025-06-30 20:44 UTC (permalink / raw)
To: linux-kernel; +Cc: alexander.usyskin, tomas.winkler, gregkh
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@listout.xyz>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] samples: mei: Fix building on musl libc
2025-06-30 20:44 [RFC PATCH] samples: mei: Fix building on musl libc Brahmajit Das
@ 2025-07-01 5:13 ` Greg KH
2025-07-01 14:38 ` Brahmajit Das
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2025-07-01 5:13 UTC (permalink / raw)
To: Brahmajit Das; +Cc: linux-kernel, alexander.usyskin, tomas.winkler
On Tue, Jul 01, 2025 at 02:14:30AM +0530, Brahmajit Das wrote:
> 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.
Can you look into that instead of just adding a #ifdef that might not
actually be needed?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] samples: mei: Fix building on musl libc
2025-07-01 5:13 ` Greg KH
@ 2025-07-01 14:38 ` Brahmajit Das
0 siblings, 0 replies; 3+ messages in thread
From: Brahmajit Das @ 2025-07-01 14:38 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, alexander.usyskin, tomas.winkler
On 01.07.2025 07:13, Greg KH wrote:
> On Tue, Jul 01, 2025 at 02:14:30AM +0530, Brahmajit Das wrote:
> > 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.
>
> Can you look into that instead of just adding a #ifdef that might not
> actually be needed?
>
> thanks,
>
> greg k-h
Did some testing and it seems like we can remove the bits/wordsize.h. It
does not affect build on either glibc or musl.
I'll send a patch.
--
Regards,
listout
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-01 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 20:44 [RFC PATCH] samples: mei: Fix building on musl libc Brahmajit Das
2025-07-01 5:13 ` Greg KH
2025-07-01 14:38 ` Brahmajit Das
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox