@@ -90,8 +90,13 @@ mca_patcher_linux_get_phdr_dynamic(const ElfW(Phdr) *phdr, uint16_t phnum, int p
90
90
return NULL ;
91
91
}
92
92
93
+ #if SIZEOF_VOID_P == 8
94
+ static const ElfW (Dyn )*
95
+ mca_patcher_linux_get_dynentry (ElfW (Addr ) base , const ElfW (Phdr ) * pdyn , int64_t type )
96
+ #else
93
97
static const ElfW (Dyn )*
94
- mca_patcher_linux_get_dynentry (ElfW (Addr ) base , const ElfW (Phdr ) * pdyn , uint32_t type )
98
+ mca_patcher_linux_get_dynentry (ElfW (Addr ) base , const ElfW (Phdr ) * pdyn , int32_t type )
99
+ #endif
95
100
{
96
101
for (ElfW (Dyn ) * dyn = (ElfW (Dyn )* )(base + pdyn -> p_vaddr ); dyn -> d_tag ; ++ dyn ) {
97
102
if (dyn -> d_tag == type ) {
@@ -196,7 +201,7 @@ static int mca_patcher_linux_get_aux_phent (void)
196
201
nread = read (fd , buffer , sizeof (buffer ));
197
202
if (nread < 0 ) {
198
203
opal_output_verbose (MCA_BASE_VERBOSE_ERROR , opal_patcher_base_framework .framework_output ,
199
- "failed to read %lu bytes from %s (ret=%ld): %s" , sizeof (buffer ),
204
+ "failed to read %" PRIsize_t " bytes from %s (ret=%ld): %s" , sizeof (buffer ),
200
205
proc_auxv_filename , nread , strerror (errno ));
201
206
break ;
202
207
}
@@ -319,7 +324,8 @@ static int mca_patcher_linux_apply_patch (mca_patcher_linux_patch_t *patch)
319
324
(void )dl_iterate_phdr (mca_patcher_linux_phdr_iterator , & ctx );
320
325
if (ctx .status == OPAL_SUCCESS ) {
321
326
opal_output_verbose (MCA_BASE_VERBOSE_INFO , opal_patcher_base_framework .framework_output ,
322
- "modified '%s' to 0x%lx" , ctx .patch -> super .patch_symbol , ctx .patch -> super .patch_value );
327
+ "modified '%s' to %" PRIxPTR , ctx .patch -> super .patch_symbol ,
328
+ ctx .patch -> super .patch_value );
323
329
}
324
330
325
331
return ctx .status ;
0 commit comments