From: Christoph Egger Subject: Re: [PATCH] Fix ioemu compile on Solaris Date: Mon, 25 Feb 2008 09:00:39 +0100 Message-ID: <200802250900.39680.Christoph.Egger@amd.com> References: <3a0e7fc8b4b7c650c937.1203685500@hatchback> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <3a0e7fc8b4b7c650c937.1203685500@hatchback> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: john.levon@sun.com List-Id: xen-devel@lists.xenproject.org On Friday 22 February 2008 14:05:00 john.levon@sun.com wrote: > # HG changeset patch > # User xen-discuss@opensolaris.org > # Date 1203680243 28800 > # Node ID 3a0e7fc8b4b7c650c9377c7b2a197c127913a622 > # Parent 0accc274f62715d356a591d2286027f7591a9412 > Fix ioemu compile on Solaris > > _POSIX_C_SOURCE does not guarantee the available of the 1003.1j option > which contains posix_memalign(). Fix the test to explicitly test for > Linux. > > Signed-off-by: John Levon > > diff --git a/tools/ioemu/osdep.c b/tools/ioemu/osdep.c > --- a/tools/ioemu/osdep.c > +++ b/tools/ioemu/osdep.c > @@ -178,7 +178,7 @@ void kqemu_vfree(void *ptr) > > void *qemu_memalign(size_t alignment, size_t size) > { > -#if defined(_POSIX_C_SOURCE) > +#if defined(__Linux__) That's wrong. NetBSD also has posix_memalign(). Maybe this: #ifndef __sun__ > int ret; > void *ptr; > ret =3D posix_memalign(&ptr, alignment, size); > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy