aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-11-19 21:06:12 -0500
committerTheodore Ts'o <tytso@mit.edu>2023-11-19 21:06:12 -0500
commit795dcc264f48098ca5b214bba7d1b94189b2e491 (patch)
tree8260e9ac4533dbfb4212bb2b5e5ea918a784da7f
parent6e776e87051268b7356ad6a244db0a5ac1c10dd5 (diff)
downloade2fsprogs-795dcc264f48098ca5b214bba7d1b94189b2e491.tar.gz
tune2fs.c: define PATH_MAX if it is not defined by the system headers
This is needed to compile on GNU/Hurd. Addresses-Debian-Bug: #1056145 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--misc/tune2fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 458f7cf6a..9ffe0d199 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -51,11 +51,15 @@ extern int optind;
#include <unistd.h>
#include <sys/types.h>
#include <libgen.h>
-#include <limits.h>
+#include <limits.h> /* for PATH_MAX */
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#include "ext2fs/ext2_fs.h"
#include "ext2fs/ext2fs.h"
#include "ext2fs/kernel-jbd.h"