summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemoc@gmail.com>2018-01-03 17:26:24 +0100
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>2018-01-03 17:26:24 +0100
commit16cde6c32fb3e0640ac01ca5d8ddea127f59106c (patch)
treeedf710d199449369d0073ac1c431dc2e7905cbe3 /src
parent5d2b607498bdf9dd83f2aafa47355573b9929881 (diff)
metaentry.c: Define PATH_MAX if it's undefined.
PATH_MAX is not guaranteed by POSIX to be present and some systems, like GNU Hurd, indeed does not define it. http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html https://www.gnu.org/software/hurd/hurd/porting/guidelines.html For now let's define PATH_MAX as 4096 (if it is not already defined), because that's how Linux defines it and it seems quite reasonable. In future dependence on PATH_MAX can be removed.
Diffstat (limited to 'src')
-rw-r--r--src/metaentry.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/metaentry.c b/src/metaentry.c
index 2e2d7a4..c33d7e2 100644
--- a/src/metaentry.c
+++ b/src/metaentry.c
@@ -43,6 +43,10 @@
#include "metaentry.h"
#include "utils.h"
+#ifndef PATH_MAX
+# define PATH_MAX 4096
+#endif
+
/* Free's a metaentry and all its parameters */
static void
mentry_free(struct metaentry *m)