diff --git a/linux/i386/arch_regs.h b/linux/i386/arch_regs.h index eeb4ebea..77984ff7 100644 --- a/linux/i386/arch_regs.h +++ b/linux/i386/arch_regs.h @@ -1 +1 @@ -extern uint32_t *const i386_esp_ptr; +extern long *const i386_esp_ptr; diff --git a/linux/x86_64/arch_regs.h b/linux/x86_64/arch_regs.h index ced226ff..eeb4ebea 100644 --- a/linux/x86_64/arch_regs.h +++ b/linux/x86_64/arch_regs.h @@ -1 +1 @@ -#include "i386/arch_regs.h" +extern uint32_t *const i386_esp_ptr; diff --git a/syscall.c b/syscall.c index 209542c7..5e1e021d 100644 --- a/syscall.c +++ b/syscall.c @@ -661,8 +661,7 @@ getrval2(struct tcb *tcp) #if defined(I386) static struct user_regs_struct i386_regs; -/* Cast suppresses signedness warning (.esp is long, not unsigned long) */ -uint32_t *const i386_esp_ptr = (uint32_t*)&i386_regs.esp; +long *const i386_esp_ptr = &i386_regs.esp; # define ARCH_REGS_FOR_GETREGS i386_regs #elif defined(X86_64) || defined(X32) /*