diff options
author | Brandon Williams <bmwill@google.com> | 2017-01-09 10:50:23 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-09 11:25:57 -0800 |
commit | 7aeb81f1de6a06c7ebc9a881e3a07591d760c9d6 (patch) | |
tree | 2f725f557ec74962d95902fc2832eb6a0afe3c90 /abspath.c | |
parent | e9a379c352b02ca560c58a56aa723994aa42666f (diff) | |
download | git-7aeb81f1de6a06c7ebc9a881e3a07591d760c9d6.tar.gz |
real_path: prevent redefinition of MAXSYMLINKS
The macro 'MAXSYMLINKS' is already defined on macOS and Linux in
<sys/param.h>. 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 <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'abspath.c')
-rw-r--r-- | abspath.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |