diff options
| author | Mark Wielaard <[email protected]> | 2017-07-18 14:12:36 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2017-07-24 12:06:14 +0200 |
| commit | 1609679b1ef3611c71a08900c2f6b94bb97d454d (patch) | |
| tree | 24b3f6dfa5308e4c3a1ddb37b5097694a263ac7f /libcpu/bpf_disasm.c | |
| parent | c8e16c12661d18e6ae724a6d89b81c0df9da365a (diff) | |
backends: Don't depend on linux/bpf.h to compile bpf disassembler.
We only need a few constants and one structure definition from linux/bpf.
Just define those in a local lib/bpf.h file. This makes sure the bpf
disassembler is always build and included even when elfutils is build
on older GNU/Linux systems (and even on other platforms).
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'libcpu/bpf_disasm.c')
| -rw-r--r-- | libcpu/bpf_disasm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libcpu/bpf_disasm.c b/libcpu/bpf_disasm.c index e4bbae4a..054aba2b 100644 --- a/libcpu/bpf_disasm.c +++ b/libcpu/bpf_disasm.c @@ -35,16 +35,11 @@ #include <stdio.h> #include <gelf.h> #include <inttypes.h> -#include <linux/bpf.h> +#include "bpf.h" #include "../libelf/common.h" #include "../libebl/libeblP.h" -/* BPF_PSEUDO_MAP_FD was only introduced in linux 3.20. */ -#ifndef BPF_PSEUDO_MAP_FD - #define BPF_PSEUDO_MAP_FD 1 -#endif - static const char class_string[8][8] = { [BPF_LD] = "ld", [BPF_LDX] = "ldx", |
