From: Andrej Shadura <andrew.shadura@collabora.co.uk>
Date: Thu, 7 May 2020 17:19:28 +0200
Subject: [PATCH 1/3] Make sure PATH_MAX is defined on GNU/Hurd

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
---
 src/strutil.cc | 1 -
 src/strutil.h  | 5 +++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/strutil.cc b/src/strutil.cc
index 8c4bdc0..0b5f268 100644
--- a/src/strutil.cc
+++ b/src/strutil.cc
@@ -17,7 +17,6 @@
 #include "strutil.h"
 
 #include <ctype.h>
-#include <limits.h>
 #include <unistd.h>
 
 #include <algorithm>
diff --git a/src/strutil.h b/src/strutil.h
index d573b79..7fefb32 100644
--- a/src/strutil.h
+++ b/src/strutil.h
@@ -17,6 +17,11 @@
 
 #include <string>
 #include <vector>
+#include <limits.h>
+// GNU Hurd doesn't have PATH_MAX
+#if defined(__GNU__) && !defined(PATH_MAX)
+#define PATH_MAX 4096
+#endif
 
 #include "string_piece.h"
 
