Skip to content

[Bug] Build failure on macOS: mod.c: error: invalid use of undefined type 'struct next' #987

@barracuda156

Description

@barracuda156

Describe the bug
Build fails:

In file included from /usr/include/net/if_var.h:71,
                 from /usr/include/net/if.h:100,
                 from ../../src/common/sendpacket.h:30,
                 from ../../src/common.h:42,
                 from mod.c:14:
mod.c: In function 'mod_close':
mod.c:180:5: error: invalid use of undefined type 'struct next'
  180 |     TAILQ_FOREACH_REVERSE(rule, &rules, next, head)
      |     ^~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
make[3]: *** [libfragroute_a-mod.o] Error 1
make[3]: *** Waiting for unfinished jobs....

To Reproduce
Steps to reproduce the behavior:

  1. Run the build.

Expected behavior
It should compile successfully.

System (please complete the following information):

  • OS: macOS
  • OS version: 10.6.8
  • Tcpreplay Version: 4.5.2

Additional context
Fails both with Xcode gcc and gcc-14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions