From: Brandon Williams Date: Mon, 9 Jan 2017 18:50:23 +0000 (-0800) Subject: real_path: prevent redefinition of MAXSYMLINKS X-Git-Tag: v2.12.0-rc0~61^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7aeb81f1de6a06c7ebc9a881e3a07591d760c9d6;p=thirdparty%2Fgit.git 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 --- 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