mark.yang 8586c9e2e8
tcpreplay: fix build error with gcc-15
There are two types of errors:
1. Linker errors for txring.c
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:328:(.text+0x1be): undefined reference to `txring_put'
TOPDIR/tmp/work/core2-64-oe-linux/tcpreplay/4.5.1/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/15.0.1/ld: ./common/libcommon.a(sendpacket.o): in function `sendpacket_open_pf':
/usr/src/debug/tcpreplay/4.5.1/src/common/sendpacket.c:1088:(.text+0x7ea): undefined reference to `txring_init'

The txring file needs to include config.h to build properly.
Surprisingly, in the same environment with gcc14, HAVE_TX_RING is not declared in config.h because it fails during the configure stage.

The config.log below is from the same environment with gcc14.
configure:26549: result: no
configure:26557: checking for TX_RING socket sending support
configure:26579: conftest.c >&5
In file included from conftest.c:130:
/linux/if_packet.h:14:8: error: redefinition of 'struct sockaddr_ll'
   14 | struct sockaddr_ll {
      |        ^~~~~~~~~~~
Therefore, it seems that the linker error did not occur previously.

2. Incompatible type assignment in txring.c when allocating memory for txring_t structure

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-10 08:31:06 -07:00
..
2024-02-09 09:52:12 -08:00
2022-08-15 16:27:53 -07:00
2024-10-01 17:56:44 -07:00
2025-03-24 07:29:13 -07:00
2024-11-23 09:00:14 -08:00
2025-04-10 08:31:03 -07:00
2025-01-07 09:33:14 -08:00
2025-02-20 08:32:46 -08:00
2023-02-16 19:33:29 -08:00
2023-08-03 09:14:20 -07:00
2025-03-21 11:07:33 -07:00
2023-06-14 09:41:35 -07:00
2024-03-26 14:00:53 -07:00
2023-10-17 21:42:56 -07:00
2024-02-09 09:52:12 -08:00
2025-02-17 21:35:47 -08:00
2024-05-23 08:44:42 -07:00
2024-10-10 12:53:51 -07:00
2024-03-09 10:55:22 -08:00
2024-02-09 09:52:12 -08:00
2025-02-01 08:59:27 -08:00
2025-01-24 18:27:39 -08:00
2025-04-07 12:21:18 -07:00
2024-02-09 09:52:12 -08:00
2024-04-09 13:56:26 -07:00
2023-05-28 16:34:59 -07:00
2024-05-19 08:27:58 -07:00
2024-07-15 16:36:15 -07:00
2024-03-25 12:50:39 -07:00
2024-12-19 09:41:25 -08:00
2024-11-21 21:42:35 -08:00
2023-12-29 09:04:16 -08:00
2024-08-09 14:25:20 -07:00
2025-02-23 09:56:37 -08:00