Attempt a quick bandaid for arm build breakage. I went to the trouble of
maintaining alignment, but I'm not sure how to tell gcc this.
This commit is contained in:
parent
f3c713fdaf
commit
de94a63bd1
@ -42,7 +42,7 @@ kinfo_getfile(pid_t pid, int *cntp)
|
||||
bp = buf;
|
||||
eb = buf + len;
|
||||
while (bp < eb) {
|
||||
kf = (struct kinfo_file *)bp;
|
||||
kf = (struct kinfo_file *)(uintptr_t)bp;
|
||||
bp += kf->kf_structsize;
|
||||
cnt++;
|
||||
}
|
||||
@ -57,7 +57,7 @@ kinfo_getfile(pid_t pid, int *cntp)
|
||||
kp = kif;
|
||||
/* Pass 2: unpack */
|
||||
while (bp < eb) {
|
||||
kf = (struct kinfo_file *)bp;
|
||||
kf = (struct kinfo_file *)(uintptr_t)bp;
|
||||
/* Copy/expand into pre-zeroed buffer */
|
||||
memcpy(kp, kf, kf->kf_structsize);
|
||||
/* Advance to next packed record */
|
||||
|
@ -42,7 +42,7 @@ kinfo_getvmmap(pid_t pid, int *cntp)
|
||||
bp = buf;
|
||||
eb = buf + len;
|
||||
while (bp < eb) {
|
||||
kv = (struct kinfo_vmentry *)bp;
|
||||
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
|
||||
bp += kv->kve_structsize;
|
||||
cnt++;
|
||||
}
|
||||
@ -57,7 +57,7 @@ kinfo_getvmmap(pid_t pid, int *cntp)
|
||||
kp = kiv;
|
||||
/* Pass 2: unpack */
|
||||
while (bp < eb) {
|
||||
kv = (struct kinfo_vmentry *)bp;
|
||||
kv = (struct kinfo_vmentry *)(uintptr_t)bp;
|
||||
/* Copy/expand into pre-zeroed buffer */
|
||||
memcpy(kp, kv, kv->kve_structsize);
|
||||
/* Advance to next packed record */
|
||||
|
Loading…
Reference in New Issue
Block a user