Define PATH_MAX for GNU/hurd

Otherwise fails with
"> linux/LinuxProcessList.c:889:20: error: ‘PATH_MAX’ undeclared (first use in this function)"
This commit is contained in:
Daniel Lange 2021-01-14 13:27:47 +01:00 committed by BenBE
parent 1f20c0fb3d
commit 71f51a20c1
3 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,7 @@ in the source distribution for its full text.
#include "LinuxProcess.h" #include "LinuxProcess.h"
#include "Macros.h" #include "Macros.h"
#include "Object.h" #include "Object.h"
#include "Platform.h" // needed for GNU/hurd to get PATH_MAX
#include "Process.h" #include "Process.h"
#include "Settings.h" #include "Settings.h"
#include "XUtils.h" #include "XUtils.h"

View File

@ -14,7 +14,6 @@ in the source distribution for its full text.
#include <dirent.h> #include <dirent.h>
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h>
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>

View File

@ -7,6 +7,7 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text. in the source distribution for its full text.
*/ */
#include <limits.h>
#include <stdbool.h> #include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
@ -18,6 +19,12 @@ in the source distribution for its full text.
#include "ProcessLocksScreen.h" #include "ProcessLocksScreen.h"
#include "SignalsPanel.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 ProcessField Platform_defaultFields[];
extern const SignalItem Platform_signals[]; extern const SignalItem Platform_signals[];