summary refs log tree commit diff stats
path: root/qga/commands-posix.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-05-30 15:02:03 +0800
committerAnthony Liguori <aliguori@us.ibm.com>2012-05-30 15:02:03 +0800
commitd6111501c15972e48b20a60ab0fdd726e84a3ed1 (patch)
tree9a62891981a2f89dd2a73bf58134bf6aad7471d2 /qga/commands-posix.c
parenteba25057b9a5e19d10ace2bc7716667a31297169 (diff)
parent9e2fa418fbe71dd472fe5a9cd89ca26d5b594920 (diff)
downloadfocaccia-qemu-d6111501c15972e48b20a60ab0fdd726e84a3ed1.tar.gz
focaccia-qemu-d6111501c15972e48b20a60ab0fdd726e84a3ed1.zip
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
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r--qga/commands-posix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index dab3bf9c98..00d035da95 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 @@ static int guest_fsfreeze_build_mount_list(GuestFsfreezeMountList *mounts)
 {
     struct mntent *ment;
     GuestFsfreezeMount *mount;
-    char const *mtab = MOUNTED;
+    char const *mtab = "/proc/self/mounts";
     FILE *fp;
 
     fp = setmntent(mtab, "r");