From owner-cvs-src@FreeBSD.ORG Sun Oct 28 15:41:14 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC27F16A419; Sun, 28 Oct 2007 15:41:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CC0E613C491; Sun, 28 Oct 2007 15:41:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9SFfETw098477; Sun, 28 Oct 2007 15:41:14 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9SFfEaq098476; Sun, 28 Oct 2007 15:41:14 GMT (envelope-from marius) Message-Id: <200710281541.l9SFfEaq098476@repoman.freebsd.org> From: Marius Strobl Date: Sun, 28 Oct 2007 15:41:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/lib/libstand tftp.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 15:41:15 -0000 marius 2007-10-28 15:41:11 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) lib/libstand tftp.c Log: - 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. - Sprinkle const on a lookup table. Approved by: re (kensmith) Revision Changes Path 1.12.10.1 +4 -4 src/lib/libstand/tftp.c