From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 26 21:32:38 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63635106568C for ; Fri, 26 Sep 2008 21:32:38 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 1A37C8FC0A for ; Fri, 26 Sep 2008 21:32:38 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 390C9191A59; Fri, 26 Sep 2008 23:32:36 +0200 (CEST) Received: from saturn.kn-bremen.de (noident@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id m8QLTQDp010848; Fri, 26 Sep 2008 23:29:26 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id m8QLTP0g010847; Fri, 26 Sep 2008 23:29:25 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 26 Sep 2008 23:29:25 +0200 To: Anthony Liguori Message-ID: <20080926212925.GA10666@saturn.kn-bremen.de> Mail-Followup-To: Anthony Liguori , qemu-devel@nongnu.org, freebsd-emulation@freebsd.org References: <20080921204025.GA81055@saturn.kn-bremen.de> <200809242210.m8OMAcSZ021572@saturn.kn-bremen.de> <20080925201703.GA12142@saturn.kn-bremen.de> <48DBF71E.1000405@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48DBF71E.1000405@codemonkey.ws> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-emulation@freebsd.org, qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] preprocessor issue in qemu/patch-block-raw-posix.c X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2008 21:32:38 -0000 On Thu, Sep 25, 2008 at 03:39:58PM -0500, Anthony Liguori wrote: > Juergen Lock wrote: >> I forgot to note that this also needed the following patch: >> > > Why? This #ifdef is working around a very specific bug. > Well, looks like the preprocessor tries to parse the entire expression including the undefined `!__GLIBC_PREREQ(2, 4)' before evaluating it: block-raw-posix.c:548:69: missing binary operator before token "(" so I just put it on an extra line. > Regards, > > Anthony Liguori > >> Index: qemu/block-raw-posix.c >> @@ -545,7 +545,8 @@ >> qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, >> posix_aio_flush, s); >> -#if defined(__linux__) && defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, >> 4) >> +#if defined(__linux__) && defined(__GLIBC_PREREQ) >> +#if !__GLIBC_PREREQ(2, 4) >> { >> /* XXX: aio thread exit seems to hang on RedHat 9 and this init >> seems to fix the problem. */ >> @@ -557,6 +558,7 @@ >> aio_init(&ai); >> } >> #endif >> +#endif >> posix_aio_state = s; >> return 0; >> >> Signed-off-by: Juergen Lock >> >> >> >