Index: linux-user/syscall.c =================================================================== --- linux-user/syscall.c (revision 4845) +++ linux-user/syscall.c (working copy) @@ -2018,7 +2018,7 @@ ret = get_errno((long)host_addr); break; } - raddr = h2g((unsigned long)host_addr); + raddr = h2g(host_addr); /* find out the length of the shared memory segment */ ret = get_errno(shmctl(first, IPC_STAT, &shm_info)); @@ -2477,7 +2477,7 @@ if (!ldt_table) return -TARGET_ENOMEM; memset(ldt_table, 0, TARGET_LDT_ENTRIES * TARGET_LDT_ENTRY_SIZE); - env->ldt.base = h2g((unsigned long)ldt_table); + env->ldt.base = h2g(ldt_table); env->ldt.limit = 0xffff; } Index: linux-user/main.c =================================================================== --- linux-user/main.c (revision 4845) +++ linux-user/main.c (working copy) @@ -2472,7 +2472,7 @@ { uint64_t *gdt_table; gdt_table = qemu_mallocz(sizeof(uint64_t) * TARGET_GDT_ENTRIES); - env->gdt.base = h2g((unsigned long)gdt_table); + env->gdt.base = h2g(gdt_table); env->gdt.limit = sizeof(uint64_t) * TARGET_GDT_ENTRIES - 1; #ifdef TARGET_ABI32 write_dt(&gdt_table[__USER_CS >> 3], 0, 0xfffff,