mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
The header, security/selinux/include/classmap.h, is included not only from kernel space but also from host programs. It includes <linux/capability.h> and <linux/socket.h>, which pull in more <linux/*.h> headers. This makes the host programs less portable, specifically causing build errors on macOS. Those headers are included for the following purposes: - <linux/capability.h> for checking CAP_LAST_CAP - <linux/socket.h> for checking PF_MAX These checks can be guarded by __KERNEL__ so they are skipped when building host programs. Testing them when building the kernel should be sufficient. The header, security/selinux/include/initial_sid_to_string.h, includes <linux/stddef.h> for the NULL definition, but this is not portable either. Instead, <stddef.h> should be included for host programs. Reported-by: Daniel Gomez <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ Closes: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Paul Moore <[email protected]>
8 lines
206 B
Makefile
8 lines
206 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
hostprogs-always-y += mdp
|
|
HOST_EXTRACFLAGS += \
|
|
-I$(srctree)/include \
|
|
-I$(srctree)/security/selinux/include -I$(objtree)/include
|
|
|
|
clean-files := policy.* file_contexts
|