aboutsummaryrefslogtreecommitdiffstats
path: root/main/sipp
diff options
context:
space:
mode:
Diffstat (limited to 'main/sipp')
-rw-r--r--main/sipp/APKBUILD19
-rw-r--r--main/sipp/fix-stdin.patch19
2 files changed, 33 insertions, 5 deletions
diff --git a/main/sipp/APKBUILD b/main/sipp/APKBUILD
index 6a7dda1ee4..b995f73438 100644
--- a/main/sipp/APKBUILD
+++ b/main/sipp/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=sipp
pkgver=3.3
-pkgrel=1
+pkgrel=2
pkgdesc="A test tool / traffic generator for the SIP protocol"
url="http://sipp.sourceforge.net/"
arch="all"
@@ -13,12 +13,18 @@ depends_dev=""
makedepends="autoconf automake openssl-dev libpcap-dev ncurses-dev lksctp-tools-dev"
install=""
subpackages=""
-source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ fix-stdin.patch"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$srcdir"/$pkgname-$pkgver
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
autoreconf -ivf
}
@@ -39,6 +45,9 @@ package() {
install -m444 -D pcap/* "$pkgdir"/usr/share/"$pkgname"/
}
-md5sums="8c1d513423f9dabee799e738b737e311 sipp-3.3.tar.gz"
-sha256sums="17fd02e6aa71d44a90c65e84a1aa39d3aa329990d4aa48e4fb4b895304dbc920 sipp-3.3.tar.gz"
-sha512sums="ab42a71426ae381b9cd1f36e1d64d5c4bfccc1359973e1909f9e9d0ce3b3a4391056250371708b12be0e7de998e88b9224c9f307b1d2ce437942103b6ad10d2b sipp-3.3.tar.gz"
+md5sums="8c1d513423f9dabee799e738b737e311 sipp-3.3.tar.gz
+887a871ffd6cfb9a831d59c9a69ac294 fix-stdin.patch"
+sha256sums="17fd02e6aa71d44a90c65e84a1aa39d3aa329990d4aa48e4fb4b895304dbc920 sipp-3.3.tar.gz
+bba2f98200bddf3b2ea83afa43e5689b83af28003b29fd407c934d6831003230 fix-stdin.patch"
+sha512sums="ab42a71426ae381b9cd1f36e1d64d5c4bfccc1359973e1909f9e9d0ce3b3a4391056250371708b12be0e7de998e88b9224c9f307b1d2ce437942103b6ad10d2b sipp-3.3.tar.gz
+67c9382e6c29642b633bba418ce2ea331c258a682791bd1205e64f4592e8cee0353051e902a7a68879ca3a12000a7808505ffb5ef033b69a28bc1901a727e82e fix-stdin.patch"
diff --git a/main/sipp/fix-stdin.patch b/main/sipp/fix-stdin.patch
new file mode 100644
index 0000000000..c420d5dceb
--- /dev/null
+++ b/main/sipp/fix-stdin.patch
@@ -0,0 +1,19 @@
+--- ./sipp.cpp.orig 2013-09-23 15:05:15.164194852 +0000
++++ ./sipp.cpp 2013-09-23 15:07:12.685491835 +0000
+@@ -1989,8 +1989,15 @@
+ }
+ }
+
++static int stdin_mode;
++void reset_stdin_socket() {
++ fcntl(fileno(stdin), F_SETFL, stdin_mode);
++}
++
+ void setup_stdin_socket() {
+- fcntl(fileno(stdin), F_SETFL, fcntl(fileno(stdin), F_GETFL) | O_NONBLOCK);
++ stdin_mode = fcntl(fileno(stdin), F_GETFL);
++ atexit(reset_stdin_socket);
++ fcntl(fileno(stdin), F_SETFL, stdin_mode | O_NONBLOCK);
+ stdin_socket = sipp_allocate_socket(0, T_UDP, fileno(stdin), 0);
+ if (!stdin_socket) {
+ ERROR_NO("Could not setup keyboard (stdin) socket!\n");