From 6a99bc632cf0903b0e25601b937f69bb995a756f Mon Sep 17 00:00:00 2001 From: Celeste <20312-Celeste@users.gitlab.alpinelinux.org> Date: Sat, 12 Jul 2025 06:48:04 +0000 Subject: [PATCH] community/tcpreplay: fix build with gcc 15 --- community/tcpreplay/APKBUILD | 16 ++++++++-- .../tcpreplay/remove-tx_ring-checks.patch | 30 +++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 community/tcpreplay/remove-tx_ring-checks.patch diff --git a/community/tcpreplay/APKBUILD b/community/tcpreplay/APKBUILD index 18e3e73b870..6b52272375c 100644 --- a/community/tcpreplay/APKBUILD +++ b/community/tcpreplay/APKBUILD @@ -8,9 +8,18 @@ pkgdesc="Replay captured network traffic" url="https://tcpreplay.appneta.com/" arch="all" license="GPL-3.0-or-later" -makedepends="linux-headers libdnet-dev libpcap-dev tcpdump" +makedepends=" + autoconf + automake + libdnet-dev + libpcap-dev + libtool + linux-headers + tcpdump + " subpackages="$pkgname-doc" source="https://downloads.sourceforge.net/tcpreplay/tcpreplay-$pkgver.tar.gz + remove-tx_ring-checks.patch skip-tests-require-root.patch " @@ -34,10 +43,12 @@ esac prepare() { default_prepare - update_config_sub + + autoreconf -fvi } build() { + CFLAGS="$CFLAGS -DPROTOTYPES -Wno-incompatible-pointer-types" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -62,5 +73,6 @@ package() { sha512sums=" 75d6bbdf469d4eab5c5206422ec1dcf8ccda1469b1cf36fa37d65550fc781f91919e315708f2cca6b25ac396a4c2395c67f653b6a11901b5568d450ae4424333 tcpreplay-4.5.1.tar.gz +0f6237949fb3676e344bbe7cf00e07f93e84491784a5693f7a49acc657520fcad3f68fa0a68dfaf1837c984ed4422b02cf17f6bb414ce72a7ef22909ccd35a9d remove-tx_ring-checks.patch cd8e1f7cd9a1fccf018e1bcbe0da86552e5adeecb679be15f2e492640af856eaf1b7266b5316674e3fe20c57d35d963292c18841db344eee4349b4a0d8496ded skip-tests-require-root.patch " diff --git a/community/tcpreplay/remove-tx_ring-checks.patch b/community/tcpreplay/remove-tx_ring-checks.patch new file mode 100644 index 00000000000..c49450fa2df --- /dev/null +++ b/community/tcpreplay/remove-tx_ring-checks.patch @@ -0,0 +1,30 @@ +Patch-Source: https://src.fedoraproject.org/rpms/tcpreplay/blob/f42/f/tcpreplay-4.5.1-configure_ac.patch + +--- tcpreplay-4.5.1/configure.ac.org 2025-01-26 10:21:46.751142871 +1100 ++++ tcpreplay-4.5.1/configure.ac 2025-01-26 10:43:21.592419510 +1100 +@@ -1498,25 +1498,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + ]) + + have_tx_ring=no +-dnl Check for older Linux TX_RING support +-AC_MSG_CHECKING(for TX_RING socket sending support) +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +-#include +-#include +-#include /* the L2 protocols */ +-#include /* htons */ +-#include +-]], [[ +- int test; +- test = TP_STATUS_WRONG_FORMAT +-]])],[ +- AC_DEFINE([HAVE_TX_RING], [1], +- [Do we have Linux TX_RING socket support?]) +- AC_MSG_RESULT(yes) +- have_tx_ring=yes +-],[ +- AC_MSG_RESULT(no) +-]) + + AC_CHECK_HEADERS([bpf/libbpf.h]) + AC_CHECK_HEADERS([bpf/bpf.h])