git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix compilation on OS X.
@ 2013-07-20  7:49 Benoit Sigoure
  2013-07-20  7:55 ` Ramkumar Ramachandra
  2013-07-20 12:06 ` Torsten Bögershausen
  0 siblings, 2 replies; 10+ messages in thread
From: Benoit Sigoure @ 2013-07-20  7:49 UTC (permalink / raw)
  To: git; +Cc: Benoit Sigoure

On OS X libc headers don't define `environ', and since ec535cc2 removed
the redundant declaration this code no longer builds on OS X.
---
 compat/unsetenv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compat/unsetenv.c b/compat/unsetenv.c
index 4ea1856..addf3dc 100644
--- a/compat/unsetenv.c
+++ b/compat/unsetenv.c
@@ -1,5 +1,10 @@
 #include "../git-compat-util.h"
 
+#ifdef __APPLE__
+// On OS X libc headers don't define this symbol.
+extern char **environ;
+#endif
+
 void gitunsetenv (const char *name)
 {
      int src, dst;
-- 
1.8.2.1.539.g4196a96

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

end of thread, other threads:[~2013-07-21 22:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-20  7:49 [PATCH] Fix compilation on OS X Benoit Sigoure
2013-07-20  7:55 ` Ramkumar Ramachandra
2013-07-20  7:56   ` tsuna
2013-07-20 12:06 ` Torsten Bögershausen
2013-07-20 18:41   ` Benoit Sigoure
2013-07-21  5:53   ` Junio C Hamano
2013-07-21  6:10     ` tsuna
2013-07-21  6:17     ` [PATCH] Revert "compat/unsetenv.c: Fix a sparse warning" Benoit Sigoure
2013-07-21 19:54       ` Benoit Sigoure
2013-07-21 22:09         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).