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:
Peter Wemm 2008-12-02 10:10:50 +00:00
parent f3c713fdaf
commit de94a63bd1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185553
2 changed files with 4 additions and 4 deletions

View File

@ -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 */

View File

@ -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 */