Bug#762581: libktorrent: FTBFS on hurd-i386
Source: libktorrent
Version: 1.3.1-3
Severity: important
User: debian-hurd@lists.debian.org
Usertags: hurd
Tags: patch
Hi,
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.
Thanks!
--- 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
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#ifdef HAVE_XFS_XFS_H
#if !defined(HAVE___S64) || !defined(HAVE___U64)
Reply to: