From: Benoit Sigoure <tsunanet@gmail•com>
To: git@vger•kernel.org
Cc: Benoit Sigoure <tsunanet@gmail•com>
Subject: [PATCH] Fix compilation on OS X.
Date: Sat, 20 Jul 2013 00:49:27 -0700 [thread overview]
Message-ID: <1374306567-16640-1-git-send-email-tsunanet@gmail.com> (raw)
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
next reply other threads:[~2013-07-20 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 7:49 Benoit Sigoure [this message]
2013-07-20 7:55 ` [PATCH] Fix compilation on OS X 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374306567-16640-1-git-send-email-tsunanet@gmail.com \
--to=tsunanet@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox