Source: libktorrent
Version: 1.3.1-3
Severity: important
Usertags: hurd
Tags: patch


libktorrent fails to build from source on GNU/Hurd due to PATH_MAX
usage in the file src/util/fileops.cpp, which is not defined. The
function getmntent_r() is used, and the third and fourth arguments are a
buffer, and it's length, respectively. Since dynamic allocation of that
buffer is non-trivial, define that buffer length with a constant length,
for this case 4096. This is the same length of the PATH_MAX constant for
other OSes. The patch is attached.


--- a/src/util/fileops.cpp.orig	2013-01-14 18:09:10.000000000 +0100
+++ b/src/util/fileops.cpp	2014-09-23 11:26:28.000000000 +0200
@@ -54,6 +54,10 @@
 #define NAME_MAX 255
+#ifndef PATH_MAX
+#define PATH_MAX 4096
 #ifdef HAVE_XFS_XFS_H
 #if !defined(HAVE___S64) || !defined(HAVE___U64)
pkg-kde-extras mailing list

Reply via email to