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);