qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin
@ 2012-05-27 15:02 Andreas Färber
  2012-05-27 15:07 ` Andreas Färber
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Färber @ 2012-05-27 15:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Färber, Charlie Somerville, Michael Roth

Use _NSGetEnviron() helper to access the environment.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Charlie Somerville <charlie@charliesomerville.com>
---
 Michael, can you please append this to your qemu-ga PULL?
 
 qga/commands-posix.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index dab3bf9..4a71c27 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -22,8 +22,13 @@
 #include "host-utils.h"
 
 #ifndef CONFIG_HAS_ENVIRON
+#ifdef __APPLE__
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#else
 extern char **environ;
 #endif
+#endif
 
 #if defined(__linux__)
 #include <mntent.h>
-- 
1.7.5.3

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

end of thread, other threads:[~2012-05-27 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 15:02 [Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin Andreas Färber
2012-05-27 15:07 ` Andreas Färber

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