[PATCH] Undefine strlcpy if needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]