summaryrefslogtreecommitdiff
path: root/net-p2p/rtorrent
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-24 09:30:18 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-01-24 09:30:18 +0300
commit96e3566705d169dc1098edfa67124a1d5e4ea606 (patch)
tree4d3011ae7049978e84a5f820cffec04272d94a2c /net-p2p/rtorrent
parent81765576687b1e0ca7a9bb66fd74d7a06d05459e (diff)
rtorrent: startup crash fix
Diffstat (limited to 'net-p2p/rtorrent')
-rw-r--r--net-p2p/rtorrent/files/crashfix.patch14
-rw-r--r--net-p2p/rtorrent/rtorrent-scm.ebuild5
2 files changed, 18 insertions, 1 deletions
diff --git a/net-p2p/rtorrent/files/crashfix.patch b/net-p2p/rtorrent/files/crashfix.patch
new file mode 100644
index 0000000..1c3f1c9
--- /dev/null
+++ b/net-p2p/rtorrent/files/crashfix.patch
@@ -0,0 +1,14 @@
+diff --git a/src/command_network.cc b/src/command_network.cc
+index 2b6874c..4050141 100644
+--- a/src/command_network.cc
++++ b/src/command_network.cc
+@@ -304,7 +304,7 @@ network_port_range_set(const std::string& arg) {
+ uint16_t port_first;
+ uint16_t port_last;
+
+- if (std::sscanf(arg.c_str(), "%" PRIu16 "-%" PRIu16, &port_first, &port_last) != 2)
++ if (std::sscanf(arg.c_str(), "%" SCNu16 "-%" SCNu16, &port_first, &port_last) != 2)
+ throw torrent::input_error("Invalid port_range argument.");
+
+ torrent::bind()->set_listen_port_range(port_first, port_last, 0);
+
diff --git a/net-p2p/rtorrent/rtorrent-scm.ebuild b/net-p2p/rtorrent/rtorrent-scm.ebuild
index a141f85..266443c 100644
--- a/net-p2p/rtorrent/rtorrent-scm.ebuild
+++ b/net-p2p/rtorrent/rtorrent-scm.ebuild
@@ -27,10 +27,13 @@ RDEPEND="${COMMON_DEPEND}
DEPEND="${COMMON_DEPEND}
dev-util/pkgconfig"
+PATCHES=(
+ "${FILESDIR}/crashfix.patch"
+)
src_prepare() {
./autogen.sh
- elibtoolize
+ default
}
src_compile() {