public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] Undefine strlcpy if needed.
@ 2014-08-24  4:32 Benoit Sigoure
  2014-08-24  4:35 ` Benoit Sigoure
  0 siblings, 1 reply; 10+ messages in thread
From: Benoit Sigoure @ 2014-08-24  4:32 UTC (permalink / raw)
  To: git; +Cc: Benoit Sigoure

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.
---
 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-08-25 11:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24  4:32 [PATCH] Undefine strlcpy if needed Benoit Sigoure
2014-08-24  4:35 ` Benoit Sigoure
2014-08-24 11:10   ` Ramsay Jones
2014-08-24 11:13     ` tsuna
2014-08-24 16:18       ` Ramsay Jones
2014-08-24 19:49         ` Torsten Bögershausen
2014-08-24 21:09           ` tsuna
2014-08-25  0:32             ` Ramsay Jones
2014-08-25  1:54               ` tsuna
2014-08-25 11:16                 ` Ramsay Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox