summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-01-14 13:27:47 +0100
committerBenBE <BenBE@geshi.org>2021-01-16 12:31:44 +0100
commit71f51a20c1f7aa94f8e8c0012448c05c465cfc01 (patch)
treef54a2cfc18dddb598a53eb2bd8d69145372c9e5d
parent1f20c0fb3debf2fa4d4be934d0b4552fdf814caa (diff)
Define PATH_MAX for GNU/hurd
Otherwise fails with "> linux/LinuxProcessList.c:889:20: error: ‘PATH_MAX’ undeclared (first use in this function)"
-rw-r--r--linux/LinuxProcessList.c1
-rw-r--r--linux/Platform.c1
-rw-r--r--linux/Platform.h7
3 files changed, 8 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 96e8de6e..c136c0fa 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -43,6 +43,7 @@ in the source distribution for its full text.
#include "LinuxProcess.h"
#include "Macros.h"
#include "Object.h"
+#include "Platform.h" // needed for GNU/hurd to get PATH_MAX
#include "Process.h"
#include "Settings.h"
#include "XUtils.h"
diff --git a/linux/Platform.c b/linux/Platform.c
index 262befa0..7077f08d 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -14,7 +14,6 @@ in the source distribution for its full text.
#include <dirent.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <limits.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
diff --git a/linux/Platform.h b/linux/Platform.h
index fe814484..d87ef55a 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
+#include <limits.h>
#include <stdbool.h>
#include <sys/types.h>
@@ -18,6 +19,12 @@ in the source distribution for its full text.
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
+/* GNU/Hurd does not have PATH_MAX in limits.h */
+#ifndef PATH_MAX
+ #define PATH_MAX 4096
+#endif
+
+
extern const ProcessField Platform_defaultFields[];
extern const SignalItem Platform_signals[];