Commit ce6ecb6
instrument functions: Work around bfd inclusion guard
In 2012 [0] [1] binutils added an inclusion guard to bfd.h, requiring to
include the autoconf config.h beforehand. This guard is triggered when
enabling instrumentation and development mode:
% git clone https://github.com/the-tcpdump-group/tcpdump.git
% cd tcpdump
% touch .devel
% ./autogen.sh
% ./configure --enable-instrument-functions --enable-smb --quiet
./mkdep -c gcc -m -M -s . -DHAVE_CONFIG_H -I. fptype.c tcpdump.c \
print-smb.c smbutil.c instrument-functions.c <libnetdissect src list>
In file included from ./instrument-functions.c:18:
/usr/include/bfd.h:35:2: error: #error config.h must be included before
this header
35 | #error config.h must be included before this header
| ^~~~~
Note than this does *not* happen on Debian-based systems, because they
remove [2] that guard since 2012 [3]. That's also why the Ubuntu-based
Linux CI is not affected.
[0] https://sourceware.org/bugzilla/show_bug.cgi?id=14072
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=bfd/bfd-in.h;h=ae8149a2;hp=d88bcb6c;hb=df7b86aa;hpb=134fa82e
[2] https://salsa.debian.org/toolchain-team/binutils/-/blob/38415eb8/debian/rules#L1045-1048
[3] https://code.launchpad.net/~doko/binutils/pkg-2.23-debian
[skip ci]1 parent 62aa26a commit ce6ecb6
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
0 commit comments