mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
iperf: fix gcc2 build.
This commit is contained in:
@@ -5,11 +5,12 @@ variety of their parameters"
|
||||
HOMEPAGE="https://sourceforge.net/projects/iperf2"
|
||||
COPYRIGHT="1999-2007 Board of Trustees of University of Illinois"
|
||||
LICENSE="UIUC"
|
||||
REVISION="2"
|
||||
REVISION="3"
|
||||
SOURCE_URI="https://github.com/theunrealgeek/iperf/archive/v${portVersion}.zip"
|
||||
CHECKSUM_SHA256="6078ac6b52b543bbd40c4061e2dcd1e12c79cff06e7f67cd7787db9b7dc70e12"
|
||||
SOURCE_FILENAME="iperf-${portVersion}.zip"
|
||||
SOURCE_DIR="iperf-${portVersion}"
|
||||
SOURCE_FILENAME="iperf-$portVersion.zip"
|
||||
SOURCE_DIR="iperf-$portVersion"
|
||||
PATCHES="iperf-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
|
||||
|
||||
26
net-analyzer/iperf/patches/iperf-2.0.9.patchset
Normal file
26
net-analyzer/iperf/patches/iperf-2.0.9.patchset
Normal file
@@ -0,0 +1,26 @@
|
||||
From 581b00aecd082f8b7bc8f13536cd7e8a781ebfa6 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 2 Oct 2018 16:31:18 +0200
|
||||
Subject: gcc2 patch
|
||||
|
||||
|
||||
diff --git a/src/sockets.c b/src/sockets.c
|
||||
index ca4640f..204e725 100644
|
||||
--- a/src/sockets.c
|
||||
+++ b/src/sockets.c
|
||||
@@ -206,10 +206,12 @@ bool setsock_blocking (int fd, bool blocking) {
|
||||
unsigned long mode = blocking ? 0 : 1;
|
||||
return (ioctlsocket(fd, FIONBIO, &mode) == 0) ? TRUE : FALSE;
|
||||
#else
|
||||
+{
|
||||
int flags = fcntl(fd, F_GETFL, 0);
|
||||
if (flags < 0) return FALSE;
|
||||
flags = blocking ? (flags&~O_NONBLOCK) : (flags|O_NONBLOCK);
|
||||
return (fcntl(fd, F_SETFL, flags) == 0) ? TRUE : FALSE;
|
||||
+}
|
||||
#endif
|
||||
}
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
||||
Reference in New Issue
Block a user