From owner-cvs-all Sat Jul 7 6:51:47 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id CD80A37B401; Sat, 7 Jul 2001 06:51:33 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA08572; Sat, 7 Jul 2001 23:51:30 +1000 Date: Sat, 7 Jul 2001 23:49:26 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Matt Jacob Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/ping ping.c In-Reply-To: <200107070501.f67516U79958@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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