From 93a6fb5cd6c5a59ebe26ea931347250d9804b56a Mon Sep 17 00:00:00 2001 From: shdluan Date: Wed, 4 Aug 2021 09:19:42 +0800 Subject: [PATCH] fix multiple definition Signed-off-by: shdluan --- netperf-fix-multiple-definition.patch | 20 ++++++++++++++++++++ netperf.spec | 10 ++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 netperf-fix-multiple-definition.patch diff --git a/netperf-fix-multiple-definition.patch b/netperf-fix-multiple-definition.patch new file mode 100644 index 0000000..f6b704b --- /dev/null +++ b/netperf-fix-multiple-definition.patch @@ -0,0 +1,20 @@ +--- ./src/nettest_omni.c.bak 2021-08-03 17:12:46.083392014 +0800 ++++ ./src/nettest_omni.c 2021-08-03 17:13:38.299856016 +0800 +@@ -456,15 +456,13 @@ + + /* different options for the sockets */ + +-int ++extern int + loc_nodelay, /* don't/do use NODELAY locally */ + rem_nodelay, /* don't/do use NODELAY remotely */ + loc_sndavoid, /* avoid send copies locally */ + loc_rcvavoid, /* avoid recv copies locally */ + rem_sndavoid, /* avoid send copies remotely */ +- rem_rcvavoid; /* avoid recv_copies remotely */ +- +-extern int ++ rem_rcvavoid, /* avoid recv_copies remotely */ + loc_tcpcork, + rem_tcpcork, + local_connected, diff --git a/netperf.spec b/netperf.spec index e2a1194..8c21a8f 100644 --- a/netperf.spec +++ b/netperf.spec @@ -2,12 +2,14 @@ Name: netperf Version: 2.7.0 -Release: 4 +Release: 5 Summary: A Performance benchmark testing tool fro TCP/UDP License: MIT URL: http://github.com/HewlettPackard/netperf Source0: https://github.com/HewlettPackard/netperf/archive/%{name}-%{_version}.tar.gz +Patch1: netperf-fix-multiple-definition.patch + BuildRequires: gcc texinfo texinfo-tex %description @@ -17,9 +19,10 @@ netperf is a collection of many different network performance benchmarking tool %prep %setup -q +%patch1 %build -%configure +%configure %{__make} %{_smp_mflags} %install @@ -50,6 +53,9 @@ netperf is a collection of many different network performance benchmarking tool %{_mandir}/man1/* %changelog +* Mon Aug 4 2021 shdluan - 2.7.0-5 +- fix multiple defination of variable + * Thu Jun 03 2021 zhaoyao - 2.7.0.-4 - fixs failed: gcc command not found. -- Gitee