Skip to content

Commit

Permalink
lib/testing: Include compat.h instead of using locai ifdef
Browse files Browse the repository at this point in the history
The test-tool binary was using its own ifdef'ed compatibility define
instead of just including compat.h, which leads to errors when one of the
other headers in util does include compat.h. So remove the local define and
just include compat.h directly instead.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
  • Loading branch information
tohojo committed May 31, 2023
1 parent a7bc4c7 commit f4cbb40
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/testing/test-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,11 @@
#include "logging.h"
#include "util.h"
#include "xdp_sample.h"
#include "compat.h"


#define PROG_NAME "test-tool"


#ifndef HAVE_LIBBPF_BPF_OBJECT__NEXT_PROGRAM
static struct bpf_program *bpf_object__next_program(const struct bpf_object *obj,
struct bpf_program *prog)
{
return bpf_program__next(prog, obj);
}
#endif


struct enum_val xdp_modes[] = {
{"native", XDP_MODE_NATIVE},
{"skb", XDP_MODE_SKB},
Expand Down

0 comments on commit f4cbb40

Please sign in to comment.