From patchwork Tue Oct 5 19:28:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 66853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C7389B70AB for ; Wed, 6 Oct 2010 06:29:50 +1100 (EST) Received: from localhost ([127.0.0.1]:40902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3DCt-0007JQ-0e for incoming@patchwork.ozlabs.org; Tue, 05 Oct 2010 15:29:47 -0400 Received: from [140.186.70.92] (port=40988 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3DBZ-0007HM-GG for qemu-devel@nongnu.org; Tue, 05 Oct 2010 15:28:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3DBY-0003Zo-0w for qemu-devel@nongnu.org; Tue, 05 Oct 2010 15:28:25 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:58731 helo=TX2EHSOBE010.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3DBX-0003Zj-RP for qemu-devel@nongnu.org; Tue, 05 Oct 2010 15:28:23 -0400 Received: from mail82-tx2-R.bigfish.com (10.9.14.242) by TX2EHSOBE010.bigfish.com (10.9.40.30) with Microsoft SMTP Server id 14.1.225.8; Tue, 5 Oct 2010 19:28:22 +0000 Received: from mail82-tx2 (localhost.localdomain [127.0.0.1]) by mail82-tx2-R.bigfish.com (Postfix) with ESMTP id 5C13ABB84FD for ; Tue, 5 Oct 2010 19:28:22 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h61h) Received: from mail82-tx2 (localhost.localdomain [127.0.0.1]) by mail82-tx2 (MessageSwitch) id 1286306901973272_3929; Tue, 5 Oct 2010 19:28:21 +0000 (UTC) Received: from TX2EHSMHS028.bigfish.com (unknown [10.9.14.246]) by mail82-tx2.bigfish.com (Postfix) with ESMTP id CDCDC15B8056 for ; Tue, 5 Oct 2010 19:28:21 +0000 (UTC) Received: from az33egw01.freescale.net (192.88.158.102) by TX2EHSMHS028.bigfish.com (10.9.99.128) with Microsoft SMTP Server (TLS) id 14.0.482.44; Tue, 5 Oct 2010 19:28:19 +0000 Received: from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151]) by az33egw01.freescale.net (8.14.3/8.14.3) with ESMTP id o95JSIqN005924 for ; Tue, 5 Oct 2010 12:28:18 -0700 (MST) Received: from az33exm25.fsl.freescale.net (az33exm25.am.freescale.net [10.64.32.16]) by de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id o95JiEZr022406 for ; Tue, 5 Oct 2010 14:44:14 -0500 (CDT) Received: from udp111988uds.am.freescale.net ([10.82.121.95]) by az33exm25.fsl.freescale.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 12:28:17 -0700 Date: Tue, 5 Oct 2010 14:28:17 -0500 From: Scott Wood To: QEMU Developers Message-ID: <20101005192817.GA31707@udp111988uds.am.freescale.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 05 Oct 2010 19:28:17.0423 (UTC) FILETIME=[762CA9F0:01CB64C3] X-Reverse-DNS: az33egw01.freescale.net X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) Subject: [Qemu-devel] [PATCH v2] configure: include stddef.h for NULL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This fixes an observed failure to detect madvise() on Linux. To avoid similar issues, all other tests that use NULL but don't already have stddef.h (or another header that is defined to provide NULL, such as stdio.h, unistd.h, or time.h) are also fixed. Signed-off-by: Scott Wood --- This version doesn't add stddef.h where another header is defined to provide NULL. configure | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/configure b/configure index e0d34fd..0eaf2cf 100755 --- a/configure +++ b/configure @@ -1319,6 +1319,7 @@ if test "$vnc_png" != "no" ; then cat > $TMPC < #include +#include int main(void) { png_structp png_ptr; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); @@ -1503,6 +1504,7 @@ if test "$brlapi" != "no" ; then brlapi_libs="-lbrlapi" cat > $TMPC << EOF #include +#include int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } EOF if compile_prog "" "$brlapi_libs" ; then @@ -1737,6 +1739,7 @@ if test "$linux_aio" != "no" ; then cat > $TMPC < #include +#include int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0); return 0; } EOF if compile_prog "" "-laio" ; then @@ -2094,6 +2097,7 @@ madvise=no cat > $TMPC << EOF #include #include +#include int main(void) { return madvise(NULL, 0, MADV_DONTNEED); } EOF if compile_prog "" "" ; then @@ -2106,6 +2110,7 @@ fi posix_madvise=no cat > $TMPC << EOF #include +#include int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); } EOF if compile_prog "" "" ; then