Unverified Commit 970f8a17 authored by Brahmajit Das's avatar Brahmajit Das Committed by Mickaël Salaün
Browse files

samples/landlock: Fix building on musl libc



Building with make allyesconfig on musl results in the following

In file included from samples/landlock/sandboxer.c:22:
/usr/include/sys/prctl.h:88:8: error: redefinition of 'struct prctl_mm_map'
   88 | struct prctl_mm_map {
      |        ^~~~~~~~~~~~
In file included from samples/landlock/sandboxer.c:16:
usr/include/linux/prctl.h:134:8: note: originally defined here
  134 | struct prctl_mm_map {
      |        ^~~~~~~~~~~~

This is mainly due to difference in the sys/prctl.h between glibc and
musl. The struct prctl_mm_map is defined in sys/prctl.h in musl.

Signed-off-by: default avatarBrahmajit Das <listout@listout.xyz>
[mic: Move down the if/include/endif block]
Link: https://lore.kernel.org/r/20250630203248.16273-1-listout@listout.xyz


Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
parent e0a69cf2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment