Date: Tue, 2 Dec 2008 10:10:50 +0000 (UTC) From: Peter Wemm <peter@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185553 - head/lib/libutil Message-ID: <200812021010.mB2AAowJ055809@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812021010.mB2AAowJ055809>