-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
Description
Describe the bug
Version 4.4.4 fails to build with clang (previous version 4.4.3 builds fine):
Compiler version:
$ clang --version
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
Target: x86_64-unknown-freebsd13.2
Thread model: posix
InstalledDir: /usr/bin
In 'mod.c', a fatal error occurs due to an incomplete definition of the 'struct next' type, resulting in a build failure.
cc -DHAVE_CONFIG_H -I. -I../../src -I./.. -I./../.. -I/usr/local/include -D_U_="__attribute__((unused))" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wno-variadic-macros -Wfatal-errors -I/usr/lib -I/usr/include -MT libfragroute_a-fragroute.o -MD -MP -MF .deps/libfragroute_a-fragroute.Tpo -c -o libfragroute_a-fragroute.o `test -f 'fragroute.c' || echo './'`fragroute.c
mv -f .deps/libfragroute_a-fragroute.Tpo .deps/libfragroute_a-fragroute.Po
cc -DHAVE_CONFIG_H -I. -I../../src -I./.. -I./../.. -I/usr/local/include -D_U_="__attribute__((unused))" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wno-variadic-macros -Wfatal-errors -I/usr/lib -I/usr/include -MT libfragroute_a-bget.o -MD -MP -MF .deps/libfragroute_a-bget.Tpo -c -o libfragroute_a-bget.o `test -f 'bget.c' || echo './'`bget.c
mv -f .deps/libfragroute_a-bget.Tpo .deps/libfragroute_a-bget.Po
cc -DHAVE_CONFIG_H -I. -I../../src -I./.. -I./../.. -I/usr/local/include -D_U_="__attribute__((unused))" -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wno-variadic-macros -Wfatal-errors -I/usr/lib -I/usr/include -MT libfragroute_a-mod.o -MD -MP -MF .deps/libfragroute_a-mod.Tpo -c -o libfragroute_a-mod.o `test -f 'mod.c' || echo './'`mod.c
mod.c:180:5: fatal error: incomplete definition of type 'struct next'
TAILQ_FOREACH_REVERSE(rule, &rules, next, head)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/queue.h:750:15: note: expanded from macro 'TAILQ_FOREACH_REVERSE'
for ((var) = TAILQ_LAST((head), headname); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/queue.h:824:44: note: expanded from macro 'TAILQ_LAST'
(*(((struct headname *)((head)->tqh_last))->tqh_last))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
mod.c:180:41: note: forward declaration of 'struct next'
TAILQ_FOREACH_REVERSE(rule, &rules, next, head)
^
Full build log: tcpreplay-4.4.4.log
To Reproduce
- Download a FreeBSD vagrant image
- Try to compile 4.4.4
System (please complete the following information):
- OS: FreeBSD
- OS version: 13.1-RELEASE-p7
- Tcpreplay Version: 4.4.4
Reactions are currently unavailable