HomeFreeBSD

sys: protect the kernel build from accidental _FORTIFY_SOURCE

Description

sys: protect the kernel build from accidental _FORTIFY_SOURCE

Fortification is a userland feature, thus the flag makes no sense in a
kernel context at the moment. Move the relevant includes that aren't
already in a !_KERNEL block under a !_KERNEL condition to avoid breaking
kernel/kmod builds that are catching a stray -D_FORTIFY_SOURCE in their
CFLAGS.

PR: 286010
Reviewed by: emaste, imp, markj
Differential Revision: https://reviews.freebsd.org/D49774

Details

Provenance
kevansAuthored on Apr 12 2025, 1:53 AM
Reviewer
emaste
Differential Revision
D49774: sys: protect the kernel build from accidental _FORTIFY_SOURCE
Parents
rG3a05fa14f9a6: loader/efi: strip trailing whitespace
Branches
Unknown
Tags
Unknown