[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] qemu-ga: Fix use of environ on Darwin
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 1/2] qemu-ga: Fix use of environ on Darwin |
Date: |
Tue, 29 May 2012 22:25:56 -0500 |
From: Andreas Färber <address@hidden>
Use _NSGetEnviron() helper to access the environment.
Signed-off-by: Andreas Färber <address@hidden>
Cc: Charlie Somerville <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
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.4.1