pkgsrc/net/rtorrent/patches/patch-ad
tron 5bc46dd7a7 Update libtorrent to version 0.13.4 and rtorrent to version 0.9.4.
A list of changes is not available unfortunately. But the update seems
to prevent crashes with a message like this one:

rtorrent: Read past initial payload after incoming encrypted handshake
2014-06-15 22:44:15 +00:00

39 lines
932 B
Text

$NetBSD: patch-ad,v 1.5 2014/06/15 22:44:15 tron Exp $
Fix build under DragonFly.
--- src/utils/directory.cc.orig 2014-04-21 14:34:45.000000000 +0100
+++ src/utils/directory.cc 2014-06-15 21:07:36.000000000 +0100
@@ -44,6 +44,10 @@
#include <rak/path.h>
#include <torrent/exceptions.h>
+#ifdef __DragonFly__
+#define d_reclen d_namlen
+#endif
+
#include "directory.h"
namespace utils {
@@ -54,7 +58,9 @@
if (m_path.empty())
return false;
- DIR* d = opendir(rak::path_expand(m_path).c_str());
+ std::string path=rak::path_expand(m_path);
+
+ DIR* d = opendir(path.c_str());
closedir(d);
return d;
@@ -65,7 +71,9 @@
if (m_path.empty())
throw torrent::input_error("Directory::update() tried to open an empty path.");
- DIR* d = opendir(rak::path_expand(m_path).c_str());
+ std::string path=rak::path_expand(m_path);
+
+ DIR* d = opendir(path.c_str());
if (d == NULL)
return false;