Skip to content

Commit d981a9f

Browse files
committed
patcher/overwrite: fix compile error on x86
Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 5bc9d9d commit d981a9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/mca/patcher/overwrite/patcher_overwrite_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int mca_patcher_overwrite_apply_patch (mca_patcher_base_patch_t *patch)
9090
#if defined(__i386__)
9191
patch->patch_data_size = 5;
9292
*(unsigned char *)(patch->patch_data+0) = 0xe9;
93-
*(unsigned int *) (patch->patch_data+1) = (unsigned int)(func_new_addr - func_old_addr - 5);
93+
*(unsigned int *) (patch->patch_data+1) = (unsigned int)(func_new_addr - patch->patch_orig - 5);
9494
#elif defined(__x86_64__)
9595
patch->patch_data_size = 13;
9696
*(unsigned short*)(patch->patch_data + 0) = 0xbb49;
@@ -237,7 +237,7 @@ static int mca_patcher_overwrite_apply_patch (mca_patcher_base_patch_t *patch)
237237

238238
#endif
239239

240-
static int mca_patcher_overwrite_patch_address (uintptr_t sys_addr, unsigned long hook_addr)
240+
static int mca_patcher_overwrite_patch_address (uintptr_t sys_addr, uintptr_t hook_addr)
241241
{
242242
mca_patcher_base_patch_t *patch;
243243
int rc;

0 commit comments

Comments
 (0)