Re: [PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/9/20 12:07 AM, Hangbin Liu wrote:
> diff --git a/lib/bpf_glue.c b/lib/bpf_glue.c
> new file mode 100644
> index 00000000..7626a893
> --- /dev/null
> +++ b/lib/bpf_glue.c

...

> +
> +int bpf_program_load(enum bpf_prog_type type, const struct bpf_insn *insns,
> +		     size_t size_insns, const char *license, char *log,
> +		     size_t size_log)
> +{
> +#ifdef HAVE_LIBBPF
> +	return bpf_load_program(type, insns, size_insns, license, 0, log, size_log);
> +#else
> +	return bpf_load_load_dev(type, insns, size_insns, license, 0, log, size_log);
> +#endif
> +}
> +

Fails to compile:

$ LIBBPF_FORCE=off ./configure
$ make
...
/usr/bin/ld: ../lib/libutil.a(bpf_glue.o): in function `bpf_program_load':
bpf_glue.c:(.text+0x13): undefined reference to `bpf_load_load_dev'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:27: ip] Error 1
make: *** [Makefile:64: all] Error 2




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux