mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-11-13 03:37:15 +00:00
tcpreplay: upgrade 4.6.1 -> 4.6.2
License-Update: file moved to repo root and removed custom preamble[1] Dropped patch that is now resolved in the upstream version. Builds successfully with glibc and musl. Changelog: https://github.com/appneta/tcpreplay/releases/tag/v4.6.2 [1]https://github.com/appneta/tcpreplay/commit/8f93af9909025eca257b550df9eafd0bfb3bfab2 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
1 parent
1affde497f
commit
c29f3e598a
2 files changed
+2
-46
No files matched your search
-43
@@ -1,43 +0,0 @@
|
||||
From: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
Date: Tue, 29 Sep 2026 02:14:39 +0000
|
||||
Subject: [PATCH] common/txring: fix struct ethhdr redefinition on musl
|
||||
|
||||
This #if was gated on "__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1", which is
|
||||
false (and always has been) for any non-glibc libc, so musl always took
|
||||
the #else branch and included the raw kernel <linux/if_ether.h> uapi
|
||||
header. sendpacket.h already brings in musl's own <netinet/if_ether.h>
|
||||
earlier in the translation unit; musl's header defines struct ethhdr
|
||||
itself and only then defines __UAPI_DEF_ETHHDR as 0, so the *following*
|
||||
<linux/if_ether.h> checks that guard and skips its own definition. With
|
||||
the #else branch taken, <linux/if_ether.h> is included via this file
|
||||
without musl's guard ever being set, so struct ethhdr is defined twice
|
||||
and the build fails with a hard redefinition error.
|
||||
|
||||
Widen the condition so any libc other than a pre-2.1 glibc uses the
|
||||
portable <net/ethernet.h> path (which both glibc and musl have always
|
||||
provided) instead of falling through to the raw uapi header.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
||||
---
|
||||
--- a/src/common/txring.h
|
||||
+++ b/src/common/txring.h
|
||||
@@ -38,7 +38,17 @@
|
||||
|
||||
#ifdef HAVE_TX_RING
|
||||
|
||||
-#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
|
||||
+/* This block used to be conditioned on plain "__GLIBC__ >= 2 &&
|
||||
+ * __GLIBC_MINOR__ >= 1" i.e. it always took the #else branch on non-glibc
|
||||
+ * libcs such as musl. That branch's <linux/if_ether.h> then races with
|
||||
+ * sendpacket.h's earlier <netinet/if_ether.h>: whichever of the two struct
|
||||
+ * ethhdr definitions is seen first "wins" and the second is a hard error
|
||||
+ * (musl's <netinet/if_ether.h> defines struct ethhdr unconditionally and
|
||||
+ * only afterwards sets __UAPI_DEF_ETHHDR=0, so <linux/if_ether.h> must be
|
||||
+ * included after it, not before). <net/ethernet.h> is the safe, universal
|
||||
+ * choice here (glibc has always had it too) and avoids the raw uapi header
|
||||
+ * entirely. */
|
||||
+#if !defined(__GLIBC__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1)
|
||||
#include <net/ethernet.h> /* the L2 protocols */
|
||||
#include <linux/if_packet.h>
|
||||
#else
|
||||
+2
-3
@@ -5,14 +5,13 @@ HOMEPAGE = "https://tcpreplay.appneta.com/"
|
||||
SECTION = "net"
|
||||
|
||||
LICENSE = "GPL-3.0-only"
|
||||
LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=10f0474a2f0e5dccfca20f69d6598ad8"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464"
|
||||
|
||||
SRC_URI = "https://github.com/appneta/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
|
||||
file://0001-libopts.m4-set-POSIX_SHELL-to-bin-sh.patch \
|
||||
file://0002-common-txring-fix-struct-ethhdr-redefinition-on-mus.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "cc3642816073fb1d96b3af36df4fb66c11f523da427f95b7b0c4c99deaa53afb"
|
||||
SRC_URI[sha256sum] = "ac4cbc58b4121edb273bc7d4603dfd6a762e7d344981233c8a253425d9dddd8f"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/appneta/tcpreplay/releases"
|
||||
UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
|
||||
Reference in new issue
Block a user