summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2008-12-02 10:10:50 +0000
committerpeter <peter@FreeBSD.org>2008-12-02 10:10:50 +0000
commit1a56ba723d173120c6f79c5dfcdc8f30b41d2498 (patch)
tree3e262a33e020803c298c16eb875d8247fa53b01a /lib
parent15d87f5061b2ceea72451807af90da076a03afcb (diff)
downloadFreeBSD-src-1a56ba723d173120c6f79c5dfcdc8f30b41d2498.zip
FreeBSD-src-1a56ba723d173120c6f79c5dfcdc8f30b41d2498.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/kinfo_getfile.c4
-rw-r--r--lib/libutil/kinfo_getvmmap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libutil/kinfo_getfile.c b/lib/libutil/kinfo_getfile.c
index de68961..ca0f832 100644
--- a/lib/libutil/kinfo_getfile.c
+++ b/lib/libutil/kinfo_getfile.c
@@ -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 */
diff --git a/lib/libutil/kinfo_getvmmap.c b/lib/libutil/kinfo_getvmmap.c
index b5e7c96..5436108 100644
--- a/lib/libutil/kinfo_getvmmap.c
+++ b/lib/libutil/kinfo_getvmmap.c
@@ -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 */
OpenPOWER on IntegriCloud