diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-05 21:25:26 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-05 21:25:26 +0000 |
commit | 83fb7adf6c653a0285a89d51b746cb642d2859cf (patch) | |
tree | 24791ee7957dae766c687945939ef17291306b32 /linux-user/main.c | |
parent | 1d43a717730346de2c664c0eccf0592eb4ba2cd8 (diff) | |
download | qemu-83fb7adf6c653a0285a89d51b746cb642d2859cf.tar.gz qemu-83fb7adf6c653a0285a89d51b746cb642d2859cf.tar.bz2 qemu-83fb7adf6c653a0285a89d51b746cb642d2859cf.zip |
Darwin patch (initial patch by Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@980 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 2275b01f97..00afaafa75 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -28,6 +28,11 @@ #define DEBUG_LOGFILE "/tmp/qemu.log" +#ifdef __APPLE__ +#include <crt_externs.h> +# define environ (*_NSGetEnviron()) +#endif + static const char *interp_prefix = CONFIG_QEMU_PREFIX; #if defined(__i386__) && !defined(CONFIG_STATIC) @@ -977,9 +982,9 @@ int main(int argc, char **argv) } else if (!strcmp(r, "L")) { interp_prefix = argv[optind++]; } else if (!strcmp(r, "p")) { - host_page_size = atoi(argv[optind++]); - if (host_page_size == 0 || - (host_page_size & (host_page_size - 1)) != 0) { + qemu_host_page_size = atoi(argv[optind++]); + if (qemu_host_page_size == 0 || + (qemu_host_page_size & (qemu_host_page_size - 1)) != 0) { fprintf(stderr, "page size must be a power of two\n"); exit(1); } @@ -1006,8 +1011,8 @@ int main(int argc, char **argv) /* Scan interp_prefix dir for replacement files. */ init_paths(interp_prefix); - /* NOTE: we need to init the CPU at this stage to get the - host_page_size */ + /* NOTE: we need to init the CPU at this stage to get + qemu_host_page_size */ env = cpu_init(); if (elf_exec(filename, argv+optind, environ, regs, info) != 0) { |