When libelf from tools/ is used for building the kernel, compilation
aborts due to access to undefined defines since Kbuild adds -Wundef
to the compiler flags.
Patch the header files to use `#if defined(...)` instead of `#if ...`
to prevent such issues.
Ref: https://github.com/NixOS/nixpkgs/issues/59929
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f3ab336d7ceda929dc8dc4a8b09a9552dc6be0b1)
Install the pkg-config definition for libelf in order to allow the
kernel build process discover it later on.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d3f86c9cc3e465fbca51aaadbb274856831ba56c)