tools: libelf: fix headers to trigger -Wundef warnings
authorJo-Philipp Wich <jo@mein.io>
Fri, 30 Aug 2019 13:22:01 +0000 (15:22 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 3 Sep 2019 08:44:21 +0000 (10:44 +0200)
commitf3ab336d7ceda929dc8dc4a8b09a9552dc6be0b1
treec89625352fd4065ba924c4e0d031f7d4f3cd1527
parentd3f86c9cc3e465fbca51aaadbb274856831ba56c
tools: libelf: fix headers to trigger -Wundef warnings

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>
tools/libelf/patches/900-fix-undefined-macro-access.patch [new file with mode: 0644]