linux-yocto/samples
Brahmajit Das 4c80835f6a samples: mei: Fix building on musl libc
[ Upstream commit 239df3e4b4 ]

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 and glibc.

However on musl we get the follwing error without sys/time.h

samples/mei/mei-amt-version.c: In function 'mei_recv_msg':
samples/mei/mei-amt-version.c:159:24: error: storage size of 'tv' isn't known
  159 |         struct timeval tv;
      |                        ^~
samples/mei/mei-amt-version.c:160:9: error: unknown type name 'fd_set'
  160 |         fd_set set;
      |         ^~~~~~
samples/mei/mei-amt-version.c:168:9: error: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]
  168 |         FD_ZERO(&set);
      |         ^~~~~~~
samples/mei/mei-amt-version.c:169:9: error: implicit declaration of function 'FD_SET'; did you mean 'L_SET'? [-Wimplicit-function-declaration]
  169 |         FD_SET(me->fd, &set);
      |         ^~~~~~
      |         L_SET
samples/mei/mei-amt-version.c:170:14: error: implicit declaration of function 'select' [-Wimplicit-function-declaration]
  170 |         rc = select(me->fd + 1, &set, NULL, NULL, &tv);
      |              ^~~~~~
samples/mei/mei-amt-version.c:171:23: error: implicit declaration of function 'FD_ISSET' [-Wimplicit-function-declaration]
  171 |         if (rc > 0 && FD_ISSET(me->fd, &set)) {
      |                       ^~~~~~~~
samples/mei/mei-amt-version.c:159:24: warning: unused variable 'tv' [-Wunused-variable]
  159 |         struct timeval tv;
      |                        ^~

Hence the the file has been included.

Fixes: c52827cc4d ("staging/mei: add mei user space example")
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Link: https://lore.kernel.org/r/20250702135955.24955-1-listout@listout.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:13:38 +02:00
..
acrn virt: acrn: Fix typos 2024-05-04 18:59:44 +02:00
auxdisplay
binderfs
bpf samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora 2025-05-29 11:02:01 +02:00
cgroup
configfs samples: configfs: add missing MODULE_DESCRIPTION() macro 2024-07-10 14:59:01 +02:00
connector
coresight
fanotify
fprobe fprobe: add missing MODULE_DESCRIPTION() macro 2024-06-12 08:44:27 +09:00
ftrace tracing: samples: Initialize trace_array_printk() with the correct function 2025-05-22 14:29:48 +02:00
hid HID: samples: fix the 2 struct_ops definitions 2024-07-05 14:08:31 +02:00
hidraw
hw_breakpoint
kdb
kfifo kfifo: don't include dma-mapping.h in kfifo.h 2024-12-05 14:03:03 +01:00
kmemleak kmemleak-test: add percpu leak 2024-09-01 20:25:50 -07:00
kobject samples/kobject: add missing MODULE_DESCRIPTION() macros 2024-06-04 18:04:28 +02:00
kprobes samples: kprobes: add missing MODULE_DESCRIPTION() macros 2024-06-12 08:44:27 +09:00
landlock samples/landlock: Fix possible NULL dereference in parse_path() 2025-02-08 09:57:11 +01:00
livepatch
mei samples: mei: Fix building on musl libc 2025-08-15 12:13:38 +02:00
nitro_enclaves
pfsm
pidfd
pktgen samples: pktgen: correct dev to DEV 2024-11-13 18:54:33 -08:00
qmi samples: qmi: Convert to platform remove callback returning void 2024-05-27 10:14:15 +02:00
rpmsg
rust rust: treewide: switch to the kernel Vec type 2025-03-13 13:01:46 +01:00
seccomp
timers
trace_events tracing: Verify event formats that have "%*p.." 2025-05-02 07:58:52 +02:00
trace_printk
uhid
user_events
v4l
vfio-mdev [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
vfs
watch_queue
watchdog
Kconfig
Makefile