Merge remote-tracking branch 'mdroth/qga-pull-5-29-12-v2' into staging
* mdroth/qga-pull-5-29-12-v2:
qemu-ga: avoid blocking on atime update when reading /etc/mtab
qemu-ga: Fix use of environ on Darwin
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index dab3bf9..00d035d 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>
@@ -340,7 +345,7 @@
{
struct mntent *ment;
GuestFsfreezeMount *mount;
- char const *mtab = MOUNTED;
+ char const *mtab = "/proc/self/mounts";
FILE *fp;
fp = setmntent(mtab, "r");