diff options
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r-- | qga/commands-posix.c | 7 |
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"); |