Date: Sat, 7 Jul 2001 23:49:26 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Matt Jacob <mjacob@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/ping ping.c Message-ID: <Pine.BSF.4.21.0107072338310.72404-100000@besplex.bde.org> In-Reply-To: <200107070501.f67516U79958@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Jul 2001, Matt Jacob wrote: > mjacob 2001/07/06 22:01:06 PDT > > Modified files: > sbin/ping ping.c > Log: > Fix unaligned access faults on alpha. > > This one is strange and goes against my rusty compiler knowledge. > > The global declaration > > struct sockaddr whereto; > > produces for both i386 && alpha: > > .comm whereto,16,1 > > which means common storage, byte aligned. Ahem. I though structs > were supposed to be ALDOUBLE always? I mean, w/o pragma packed? No. They only need to be aligned suitably for type `foo' if they have members with type `foo'. `struct sockaddr' only has members with type char or u_char, so it doesn't need much alignment, and happens not to get it. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107072338310.72404-100000>