tcpreplay icon indicating copy to clipboard operation
tcpreplay copied to clipboard

fix compile, linker error for txring

Open markyang92 opened this issue 8 months ago • 0 comments

Standards checklist:

  • [X] The PR title is descriptive.
  • [X] The PR doesn't replicate another PR which is already open.
  • [X] I have read the contribution guide and followed all the instructions.
  • [X] The code follows the code style guide detailed in the wiki.
  • [X] The code is mine or it's from somewhere with an MIT-compatible license.
  • [X] The code is efficient, to the best of my ability, and does not waste computer resources.
  • [X] The code is stable and I have tested it myself, to the best of my abilities.
  • [X] If the code introduces new aliases, I provide a valid use case for all plugin users down below.

Changes:

  • Change txring.c, txring.h

  • Ensure txring compiles correctly to avoid linker errors.

    • The result of "nm -u txring.o" shows no symbols exist.
    • The config.h has HAVE_TX_RING defined but txring.c is not aware of it. txring.c and txring.h include config.h at the beginning.
  • Modify the assignment target for the safe_malloc return value from *txp to txp.

  • This resulted in a successful build in my build environment.

markyang92 avatar Apr 10 '25 10:04 markyang92