Commit 7858b68e authored by Leo's avatar Leo

community/sngrep: upgrade to 1.4.7

parent 6a0a0877
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sngrep
pkgver=1.4.6
pkgrel=2
pkgver=1.4.7
pkgrel=0
pkgdesc="A tool for displaying SIP call message flows from a terminal"
url="https://github.com/irontec/sngrep"
arch="all !ppc64le"
......@@ -11,8 +11,7 @@ depends="sed"
makedepends="autoconf automake ncurses-dev libpcap-dev
pcre-dev libgcrypt-dev openssl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.zip::https://github.com/irontec/sngrep/archive/v$pkgver.zip
stdin-reopen-musl.patch"
source="$pkgname-$pkgver.tar.gz::https://github.com/irontec/sngrep/archive/v$pkgver.tar.gz"
prepare() {
default_prepare
......@@ -38,5 +37,4 @@ package() {
make DESTDIR="$pkgdir/" install
}
sha512sums="94139511d12bd8ce9b133670f8e5850759be91207a659e69601c9811f07b7ad6eded567490f109736d0a6cf5b29f89e910c880ee7d5509cd2f18397b5ea1fdc9 sngrep-1.4.6.zip
ce23fa094bb8905325fde8ffa6d8713c170e30c953a5d452ffe6d9e8e21bfbb53e48e0af776d19c3ed97baee7798d5ee90ec7c4557d49c3bd6754edbcec93625 stdin-reopen-musl.patch"
sha512sums="f414f9cc49b0c34cbbf5a77d285f12eb4091af3395953ed93dbe2f57d4ba3731d16c4b56c37e90744cf3784572975f485aed48cdd100898ffaee18e9a18943b1 sngrep-1.4.7.tar.gz"
diff --git a/src/capture.c b/src/capture.c
index 911c35f..2bcfc56 100644
--- a/src/capture.c
+++ b/src/capture.c
@@ -190,13 +190,14 @@ capture_offline(const char *infile, const char *outfile)
}
// Reopen tty for ncurses after pcap have used stdin
+ #ifdef __GLIBC__
if (!strncmp(infile, "/dev/stdin", 10)) {
if (!(stdin = freopen("/dev/tty", "r", stdin))) {
fprintf(stderr, "Failed to reopen tty while using stdin for capture.");
return 1;
}
}
-
+ #endif
// Get datalink to parse packets correctly
capinfo->link = pcap_datalink(capinfo->handle);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment