From owner-cvs-src-old@FreeBSD.ORG Wed Jun 15 23:22:43 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EEBD1065675 for ; Wed, 15 Jun 2011 23:22:43 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF3F8FC14 for ; Wed, 15 Jun 2011 23:22:43 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5FNMhkV077317 for ; Wed, 15 Jun 2011 23:22:43 GMT (envelope-from rodrigc@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5FNMhCI077316 for cvs-src-old@freebsd.org; Wed, 15 Jun 2011 23:22:43 GMT (envelope-from rodrigc@repoman.freebsd.org) Message-Id: <201106152322.p5FNMhCI077316@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rodrigc@repoman.freebsd.org using -f From: Craig Rodrigues Date: Wed, 15 Jun 2011 23:22:35 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libstand tftp.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2011 23:22:43 -0000 rodrigc 2011-06-15 23:22:35 UTC FreeBSD src repository Modified files: lib/libstand tftp.c Log: SVN rev 223128 on 2011-06-15 23:22:35Z by rodrigc Bring back following change which was undone in previous commit: ------------------------------------------------------------------------ r172854 | marius | 2007-10-21 10:03:18 -0700 (Sun, 21 Oct 2007) | 16 lines Changed paths: M /head/lib/libstand/tftp.c - Given that we tell the compiler that struct ip is packed and 32-bit aligned, GCC 4.2.1 also generates code for sendudp() that assumes this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing the loader to crash due to an unaligned access of wbuf in sendudp() when netbooting sparc64. Solve this by specifying wbuf as packed and 32-bit aligned, too. As for lastdata and readudp() this currently is no issue when compiled with GCC 4.2.1, though give lastdata the same treatment as wbuf for consistency and possibility of being affected in the future. [1] - Sprinkle const on a lookup table. ------------------------------------------------------------------------ Revision Changes Path 1.20 +4 -4 src/lib/libstand/tftp.c