aboutsummaryrefslogtreecommitdiff
path: root/linux-user/linuxload.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/linuxload.c')
-rw-r--r--linux-user/linuxload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c
index 381ab8914b..5cd6d91554 100644
--- a/linux-user/linuxload.c
+++ b/linux-user/linuxload.c
@@ -89,7 +89,8 @@ static int prepare_binprm(struct linux_binprm *bprm)
abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp,
abi_ulong stringp, int push_ptr)
{
- TaskState *ts = (TaskState *)thread_env->opaque;
+ CPUArchState *env = thread_cpu->env_ptr;
+ TaskState *ts = (TaskState *)env->opaque;
int n = sizeof(abi_ulong);
abi_ulong envp;
abi_ulong argv;