svn commit: r185553 - head/lib/libutil
Peter Wemm
peter at FreeBSD.org
Tue Dec 2 02:10:51 PST 2008
Author: peter
Date: Tue Dec 2 10:10:50 2008
New Revision: 185553
URL: http://svn.freebsd.org/changeset/base/185553
Log:
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.
Modified:
head/lib/libutil/kinfo_getfile.c
head/lib/libutil/kinfo_getvmmap.c
Modified: head/lib/libutil/kinfo_getfile.c
==============================================================================
--- head/lib/libutil/kinfo_getfile.c Tue Dec 2 08:23:45 2008 (r185552)
+++ head/lib/libutil/kinfo_getfile.c Tue Dec 2 10:10:50 2008 (r185553)
@@ -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 */
Modified: head/lib/libutil/kinfo_getvmmap.c
==============================================================================
--- head/lib/libutil/kinfo_getvmmap.c Tue Dec 2 08:23:45 2008 (r185552)
+++ head/lib/libutil/kinfo_getvmmap.c Tue Dec 2 10:10:50 2008 (r185553)
@@ -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 */
More information about the svn-src-head
mailing list