]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: add -DPACKAGE when including bfd.h
authorJiong Wang <jiong.wang@netronome.com>
Tue, 16 Jan 2018 23:51:47 +0000 (15:51 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 17 Jan 2018 00:15:05 +0000 (01:15 +0100)
commite5e2875c02dec4275307177775025b18d2c780fe
treef55ec48a5e30b5c45bd00e78252ab7ae14880da6
parente3179feef0e2a87b1aa7fd4c4496a7ccb4de726e
tools: bpftool: add -DPACKAGE when including bfd.h

bfd.h is requiring including of config.h except when PACKAGE or
PACKAGE_VERSION are defined.

  /* PR 14072: Ensure that config.h is included first.  */
  #if !defined PACKAGE && !defined PACKAGE_VERSION
  #error config.h must be included before this header
  #endif

This check has been introduced since May-2012. It doesn't show up in bfd.h
on some Linux distribution, probably because distributions have remove it
when building the package.

However, sometimes the user might just build libfd from source code then
link bpftool against it. For this case, bfd.h will be original that we need
to define PACKAGE or PACKAGE_VERSION.

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Makefile
tools/build/feature/Makefile