1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Author: Enrico Tassi <gareuselesinge@debian.org>
Description: define PATH_MAX if not defined (i.e. on hurd)
Forwarded-Upstream: https://github.com/widelands/widelands/issues/5614
Note that Upstream only included the first chunk. No idea whether the
second chunk is still necessary nowadays on Hurd.
---
src/io/filesystem/filesystem.cc | 4 ++++
src/wlapplication.cc | 4 ++++
2 files changed, 8 insertions(+)
Index: b/src/io/filesystem/filesystem.cc
===================================================================
--- a/src/io/filesystem/filesystem.cc
+++ b/src/io/filesystem/filesystem.cc
@@ -68,6 +68,10 @@
#define PATH_MAX 0x10000
#endif
+#ifndef PATH_MAX /* This happens, for example on the Hurd architecture */
+ #define PATH_MAX 1024
+#endif
+
namespace {
/// A class that makes iteration over filename_?.* templates easy. It is much faster than using
/// regex.
Index: b/src/wlapplication.cc
===================================================================
--- a/src/wlapplication.cc
+++ b/src/wlapplication.cc
@@ -121,6 +121,10 @@ std::string get_executable_directory(con
return executabledir;
}
+#ifndef PATH_MAX /* This happens, for example on the Hurd architecture */
+ #define PATH_MAX 1024
+#endif
+
namespace {
/**
|