From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmAO9-0005g6-J5 for qemu-devel@nongnu.org; Thu, 28 Nov 2013 17:48:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmAO1-0003Qg-Si for qemu-devel@nongnu.org; Thu, 28 Nov 2013 17:48:49 -0500 Message-ID: <5297C83D.8010207@FreeBSD.org> Date: Thu, 28 Nov 2013 23:48:29 +0100 From: Andreas Tobler MIME-Version: 1.0 References: <527D70A5.7010905@FreeBSD.org> <5297B6A4.1020300@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-ppc@nongnu.org" , QEMU Developers On 28.11.13 23:38, Peter Maydell wrote: > On 28 November 2013 21:33, Andreas Tobler wrote: >> Hello, >> >> On 09.11.13 00:15, Andreas Tobler wrote: >>> Hello, >>> >>> the attached patch fixes compilation on FreeBSD for >>> hw/ppc/mac_new/oldworld.c on FreeBSD. >>> >>> The affected function is present in machine/param.h on FreeBSD: >>> >>> #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >>> >>> To make it compile on FreeBSD I'd like to propose the below patch which >>> is in use since a longer time on the ports tree (FreeBSD) and in my >>> personal git tree. > > Rather than doing this: > + #if defined(__FreeBSD__) > + #undef round_page > + #endif > > personally I'd prefer it if we just replaced the uses of round_page() > with TARGET_PAGE_ALIGN(), which is the macro we define in > the headers for aligning up to the next page size. > > Up to the ppc submaintainers though... Whatever you prefer, I'm ready to test.... Thanks for the feedback. Andreas