Commit f1982b0a authored by Neal Norwitz's avatar Neal Norwitz

Fix SF #639945, 64-bit bug on AIX

I can't test this on the snake farm (no aix box is working).
This change works for the submitter seems correct.
Can anybody test this on 32- and 64- bit AIX?
parent 7e1f5e2e
...@@ -77,8 +77,7 @@ aix_getoldmodules(void **modlistptr) ...@@ -77,8 +77,7 @@ aix_getoldmodules(void **modlistptr)
-- "libpython[version].a" in case it's a shared lib). -- "libpython[version].a" in case it's a shared lib).
*/ */
offset = (unsigned int)ldiptr->ldinfo_next; offset = (unsigned int)ldiptr->ldinfo_next;
ldiptr = (struct ld_info *)((unsigned int) ldiptr = (struct ld_info *)((char*)ldiptr + offset);
ldiptr + offset);
continue; continue;
} }
if ((modptr = (ModulePtr)malloc(sizeof(Module))) == NULL) { if ((modptr = (ModulePtr)malloc(sizeof(Module))) == NULL) {
...@@ -98,7 +97,7 @@ aix_getoldmodules(void **modlistptr) ...@@ -98,7 +97,7 @@ aix_getoldmodules(void **modlistptr)
prevmodptr->next = modptr; prevmodptr->next = modptr;
prevmodptr = modptr; prevmodptr = modptr;
offset = (unsigned int)ldiptr->ldinfo_next; offset = (unsigned int)ldiptr->ldinfo_next;
ldiptr = (struct ld_info *)((unsigned int)ldiptr + offset); ldiptr = (struct ld_info *)((char*)ldiptr + offset);
} while (offset); } while (offset);
free(ldibuf); free(ldibuf);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment