提交 eecae147 编写于 作者: A Andreas Färber 提交者: Michael Roth

qemu-ga: Fix use of environ on Darwin

Use _NSGetEnviron() helper to access the environment.
Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
Cc: Charlie Somerville <charlie@charliesomerville.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 1c4ad9d2
...@@ -22,8 +22,13 @@ ...@@ -22,8 +22,13 @@
#include "host-utils.h" #include "host-utils.h"
#ifndef CONFIG_HAS_ENVIRON #ifndef CONFIG_HAS_ENVIRON
#ifdef __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ; extern char **environ;
#endif #endif
#endif
#if defined(__linux__) #if defined(__linux__)
#include <mntent.h> #include <mntent.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册