If PATH_MAX is already defined in the system (e.g. in /usr/include/limits.h
header) then gcc will trigger a redefinition error because of -Werror.
Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
#define EXT2_SUPER_MAGIC 0xEF53 /* include/linux/ext2_fs.h */
#define EXT2_ROOT_INO 2 /* include/linux/ext2_fs.h */
+#ifndef PATH_MAX
#define PATH_MAX 1024 /* include/linux/limits.h */
+#endif
#define MAX_LINK_COUNT 5 /* number of symbolic links to follow */
/* made up, these are pointers into FSYS_BUF */
#define S_ISDIR(mode) (((mode) & 0170000) == 0040000)
#define S_ISLNK(mode) (((mode) & 0170000) == 0120000)
+#ifndef PATH_MAX
#define PATH_MAX 1024 /* include/linux/limits.h */
+#endif
#define MAX_LINK_COUNT 5 /* number of symbolic links to follow */
/* The size of the node cache */