[iperf3/el5] Update to 3.0.1 and fix compilation for el5

Susant Sahani ssahani at fedoraproject.org
Sat Jan 18 11:05:50 UTC 2014


commit 75b268053e3df9a5cf7f7c8acb5425eac44b76fc
Author: Susant Sahani <ssahani at redhat.com>
Date:   Sat Jan 18 16:37:09 2014 +0530

    Update to 3.0.1 and fix compilation for el5

 .gitignore                           |    1 +
 iperf3.spec                          |   11 ++++++--
 sources                              |    2 +-
 tcp-congestion-compilation-fix.patch |   42 ++++++++++++++++++++++++++++++++++
 4 files changed, 52 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ec8b4dd..fe236fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /iperf-3.0b4.tar.gz
 /iperf-3.0b5.tar.gz
 /iperf-3.0.tar.gz
+/iperf-3.0.1.tar.gz
diff --git a/iperf3.spec b/iperf3.spec
index 7c07fc5..ecb4cda 100644
--- a/iperf3.spec
+++ b/iperf3.spec
@@ -1,12 +1,13 @@
 Name:	iperf3
-Version: 3.0	
+Version: 3.0.1
 Release:	1%{?dist}
 Summary: Measurement tool for TCP/UDP bandwidth performance
 
 Group:	 Applications/Internet	
 License: BSD	
 URL:	 http://code.google.com/p/iperf/
-Source0: http://stats.es.net/software/iperf-3.0.tar.gz
+Source0: http://stats.es.net/software/iperf-%{version}.tar.gz
+Patch0: tcp-congestion-compilation-fix.patch
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires: e2fsprogs-devel
 
@@ -16,7 +17,8 @@ various parameters and UDP characteristics. Iperf reports bandwidth, delay
 jitter, data-gram loss.
 
 %prep
-%setup -q -n iperf
+%setup -q -n iperf-%{version}
+%patch0 -p1
 
 %build
 %configure
@@ -41,6 +43,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Jan 14 2014 Susant Sahani <ssahani at redhat.com> 3.0.1-1
+- Update to 3.0.1 and fix compilation for el5
+
 * Fri Oct 25 2013 Steven Roberts <strobert at strobe.net> 3.0-1
 - Update to 3.0
 
diff --git a/sources b/sources
index 19d8d5c..2c7c58d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0513102f3a6c5b3055982d7d00fd1854  iperf-3.0.tar.gz
+1bb10c8144460f1b7ce9a4bba55d8dcd  iperf-3.0.1.tar.gz
diff --git a/tcp-congestion-compilation-fix.patch b/tcp-congestion-compilation-fix.patch
new file mode 100644
index 0000000..b00d361
--- /dev/null
+++ b/tcp-congestion-compilation-fix.patch
@@ -0,0 +1,42 @@
+diff -Nur iperf-3.0.1.orig/src/iperf_api.c iperf-3.0.1/src/iperf_api.c
+--- iperf-3.0.1.orig/src/iperf_api.c	2014-01-18 16:25:22.705600335 +0530
++++ iperf-3.0.1/src/iperf_api.c	2014-01-18 16:26:09.812597805 +0530
+@@ -533,7 +533,7 @@
+         {"file", required_argument, NULL, 'F'},
+         {"affinity", required_argument, NULL, 'A'},
+         {"title", required_argument, NULL, 'T'},
+-#if defined(linux)
++#if defined(linux) && defined(TCP_CONGESTION) 
+         {"linux-congestion", required_argument, NULL, 'C'},
+ #endif
+         {"help", no_argument, NULL, 'h'},
+@@ -734,7 +734,7 @@
+ 		client_flag = 1;
+                 break;
+ 	    case 'C':
+-#if defined(linux)
++#if defined(linux) && defined(TCP_CONGESTION) 
+ 		test->congestion = strdup(optarg);
+ 		client_flag = 1;
+ #else /* linux */
+diff -Nur iperf-3.0.1.orig/src/iperf_tcp.c iperf-3.0.1/src/iperf_tcp.c
+--- iperf-3.0.1.orig/src/iperf_tcp.c	2014-01-18 16:25:22.704600335 +0530
++++ iperf-3.0.1/src/iperf_tcp.c	2014-01-18 16:26:15.455597502 +0530
+@@ -184,7 +184,7 @@
+                 return -1;
+             }
+         }
+-#if defined(linux)
++#if defined(linux) && defined(TCP_CONGESTION) 
+ 	if (test->congestion) {
+ 	    if (setsockopt(s, IPPROTO_TCP, TCP_CONGESTION, test->congestion, strlen(test->congestion)) < 0) {
+ 		close(s);
+@@ -373,7 +373,7 @@
+     }
+ #endif
+ 
+-#if defined(linux)
++#if defined(linux) && defined(TCP_CONGESTION) 
+     if (test->congestion) {
+ 	if (setsockopt(s, IPPROTO_TCP, TCP_CONGESTION, test->congestion, strlen(test->congestion)) < 0) {
+ 	    close(s);


More information about the scm-commits mailing list