[PATCH] Undefine strlcpy if needed.
- From
Benoit Sigoure <tsunanet@gmail.com>
- Date
- Aug 24, 2014, 04:35 UTC
- Message-ID
- <1408854930-14322-1-git-send-email-tsunanet@gmail.com>
- In-Reply-To
- <1408854741-13956-1-git-send-email-tsunanet@gmail.com>
On OS X, strlcpy is already #define'd, which causes warnings in all the files that include `git-compat-util.h'. Note that this only occurs when building without running ./configure.
Signed-off-by: Benoit Sigoure <tsunanet@gmail.com> ---
Resending with the SOB line I forgot.
git-compat-util.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h index f587749..8c001e2 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -495,6 +495,9 @@ extern char *gitstrcasestr(const char *haystack, const char *needle); #endif #ifdef NO_STRLCPY +#ifdef strlcpy +#undef strlcpy +#endif #define strlcpy gitstrlcpy extern size_t gitstrlcpy(char *, const char *, size_t); #endif
-- 1.9.2.460.gfb82504