libelf: Add patch to prevent -Wundef warnings.

The Linux kernel includes libelf headers with -Wundef and -Werror enabled, resulting in an error when the headers are found through -I as opposed to -isystem.

Fixes https://github.com/NixOS/nixpkgs/issues/59929
This commit is contained in:
Ambroz Bizjak
2019-06-15 18:53:27 +02:00
parent 2b4ac8d003
commit 213be075d1
2 changed files with 267 additions and 0 deletions
@@ -12,6 +12,9 @@ stdenv.mkDerivation rec {
patches = [
./dont-hardcode-ar.patch
# Fix warnings from preprocessor instructions.
# https://github.com/NixOS/nixpkgs/issues/59929
./preprocessor-warnings.patch
];
doCheck = true;