From 7aeb81f1de6a06c7ebc9a881e3a07591d760c9d6 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Mon, 9 Jan 2017 10:50:23 -0800 Subject: [PATCH] real_path: prevent redefinition of MAXSYMLINKS The macro 'MAXSYMLINKS' is already defined on macOS and Linux in . If 'MAXSYMLINKS' has already been defined, use the value defined by the OS otherwise default to a value of 32 which is more inline with what is allowed by many systems. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- abspath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/abspath.c b/abspath.c index 1d56f5ed9f..0393213e5a 100644 --- a/abspath.c +++ b/abspath.c @@ -62,7 +62,9 @@ static void get_root_part(struct strbuf *resolved, struct strbuf *remaining) } /* We allow "recursive" symbolic links. Only within reason, though. */ -#define MAXSYMLINKS 5 +#ifndef MAXSYMLINKS +#define MAXSYMLINKS 32 +#endif /* * Return the real path (i.e., absolute path, with symlinks resolved -- 2.39.2