summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2026-02-06 12:24:40 -0600
committerKhem Raj <raj.khem@gmail.com>2026-02-07 08:10:01 -0800
commitd96fec1f6e79bc8df576fd33e9e957a65512e311 (patch)
tree7c9004917acfbb5958ac63dac06c9d0cc644cd3a
parent7302c3ef24b620bbe8b9d4645cca306b7f630b36 (diff)
downloadmeta-openembedded-d96fec1f6e79bc8df576fd33e9e957a65512e311.tar.gz
netperf: Fix compile error with --enable-intervals
Submitted fix: https://github.com/HewlettPackard/netperf/pull/94 Fix for multiple definition error: | <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:233: multiple definition of `signal_set'; nettest_bsd.o:<snip>/src/nettest_bsd.c:302: first defined here | <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:191: multiple definition of `interval_count'; nettest_bsd.o:<snip>/src/nettest_bsd.c:289: first defined here | <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:233: multiple definition of `signal_set'; nettest_bsd.o:<snip>/src/nettest_bsd.c:302: first defined here | <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:191: multiple definition of `interval_count'; nettest_bsd.o:<snip>/src/nettest_bsd.c:289: first defined here Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-support/netperf/files/0001-Fix-multiple-definitions-with-enable-intervals.patch69
-rw-r--r--meta-networking/recipes-support/netperf/netperf_git.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/netperf/files/0001-Fix-multiple-definitions-with-enable-intervals.patch b/meta-networking/recipes-support/netperf/files/0001-Fix-multiple-definitions-with-enable-intervals.patch
new file mode 100644
index 0000000000..f1a4139386
--- /dev/null
+++ b/meta-networking/recipes-support/netperf/files/0001-Fix-multiple-definitions-with-enable-intervals.patch
@@ -0,0 +1,69 @@
1From 3659ce248a62d98ac950ab68d8a5b4488136c85d Mon Sep 17 00:00:00 2001
2From: Ryan Eatmon <reatmon@ti.com>
3Date: Fri, 6 Feb 2026 11:52:31 -0600
4Subject: [PATCH] Fix multiple definitions with --enable-intervals
5
6There are multiple definitions of two variables when enabling intervals.
7
8| <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:233: multiple definition of `signal_set'; nettest_bsd.o:<snip>/src/nettest_bsd.c:302: first defined here
9| <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:191: multiple definition of `interval_count'; nettest_bsd.o:<snip>/src/nettest_bsd.c:289: first defined here
10| <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:233: multiple definition of `signal_set'; nettest_bsd.o:<snip>/src/nettest_bsd.c:302: first defined here
11| <snip>/ld: nettest_omni.o:<snip>/src/nettest_omni.c:191: multiple definition of `interval_count'; nettest_bsd.o:<snip>/src/nettest_bsd.c:289: first defined here
12
13Make them static for each file.
14
15Upstream-Status: Submitted [https://github.com/HewlettPackard/netperf/pull/94]
16
17Signed-off-by: Ryan Eatmon <reatmon@ti.com>
18---
19 src/nettest_bsd.c | 4 ++--
20 src/nettest_omni.c | 4 ++--
21 2 files changed, 4 insertions(+), 4 deletions(-)
22
23diff --git a/src/nettest_bsd.c b/src/nettest_bsd.c
24index 36f5810..4bbc4fa 100644
25--- a/src/nettest_bsd.c
26+++ b/src/nettest_bsd.c
27@@ -286,7 +286,7 @@ static HIST time_hist;
28 #endif /* WANT_HISTOGRAM */
29
30 #ifdef WANT_INTERVALS
31-int interval_count;
32+static int interval_count;
33 #ifndef WANT_SPIN
34 #ifdef WIN32
35 #define INTERVALS_INIT() \
36@@ -299,7 +299,7 @@ int interval_count;
37 } \
38 interval_count = interval_burst;
39 #else
40-sigset_t signal_set;
41+static sigset_t signal_set;
42 #define INTERVALS_INIT() \
43 if (interval_burst) { \
44 /* zero means that we never pause, so we never should need the \
45diff --git a/src/nettest_omni.c b/src/nettest_omni.c
46index 5d63f02..2ba5604 100644
47--- a/src/nettest_omni.c
48+++ b/src/nettest_omni.c
49@@ -188,7 +188,7 @@ static HIST time_hist;
50
51
52 #ifdef WANT_INTERVALS
53-int interval_count;
54+static int interval_count;
55 unsigned int interval_wait_microseconds;
56
57 /* hoist the timestamps up here so we can use them to factor-out the
58@@ -230,7 +230,7 @@ static struct timeval *temp_intvl_ptr = &intvl_one;
59 interval_count = interval_burst; \
60 interval_wait_microseconds = 0;
61 #else
62-sigset_t signal_set;
63+static sigset_t signal_set;
64 #define INTERVALS_INIT() \
65 if (interval_burst) { \
66 /* zero means that we never pause, so we never should need the \
67--
682.43.0
69
diff --git a/meta-networking/recipes-support/netperf/netperf_git.bb b/meta-networking/recipes-support/netperf/netperf_git.bb
index 4043da5621..d5a717b0f6 100644
--- a/meta-networking/recipes-support/netperf/netperf_git.bb
+++ b/meta-networking/recipes-support/netperf/netperf_git.bb
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/HewlettPackard/netperf.git;branch=master;protocol=ht
17 file://netserver_permissions.patch \ 17 file://netserver_permissions.patch \
18 file://0001-Makefile.am-add-ACLOCAL_AMFLAGS.patch \ 18 file://0001-Makefile.am-add-ACLOCAL_AMFLAGS.patch \
19 file://0001-Fix-too-many-arguments-error-occurring-in-gcc-15.patch \ 19 file://0001-Fix-too-many-arguments-error-occurring-in-gcc-15.patch \
20 file://0001-Fix-multiple-definitions-with-enable-intervals.patch \
20 " 21 "
21 22
22SRCREV = "3bc455b23f901dae377ca0a558e1e32aa56b31c4" 23SRCREV = "3bc455b23f901dae377ca0a558e1e32aa56b31c4"