3
0
Fork 0
forked from mirrors/nixpkgs

kcov: fix build on aarch64

Apparently, without this patch `NT_PRSTATUS` is not found. So the patch
adds the include apparently necessary. `NT_PRSTATUS` is also defined in
`<linux/ptrace.h>`, which would likely have been a better name, were it
not in the `linux/` directory, which is a priori not stable.

The need to do that is kind of weird (the change was introduced in [1],
and fedora apparently didn't need this additional import), but I'll try
to upstream it.

[1] https://github.com/SimonKagstrom/kcov/pull/239
This commit is contained in:
Léo Gaspard 2018-04-27 23:52:50 +02:00
parent be0b3e3cd0
commit 4317f7ab26
No known key found for this signature in database
GPG key ID: 8A55848B6090F9CF
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,12 @@
diff --git a/src/engines/ptrace.cc b/src/engines/ptrace.cc
index 59b615f..e02cddf 100644
--- a/src/engines/ptrace.cc
+++ b/src/engines/ptrace.cc
@@ -21,6 +21,7 @@
#if defined(__aarch64__)
# include <sys/uio.h>
+# include <elf.h>
#endif
#include <map>

View file

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib curl elfutils python libiberty libopcodes ];
patches = [ ./aarch64_nt_prstatus.patch ];
enableParallelBuilding = true;
meta = with stdenv.lib; {