From patchwork Tue May 14 20:36:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 16909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A4F2925D00 for ; Tue, 14 May 2013 20:37:22 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gf12sf1466217vcb.0 for ; Tue, 14 May 2013 13:36:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=ApxCB2vc8fUaCZP6fQ4uyzCANT7dVrKYSsbizIN+KKc=; b=Ee8gdeimBnfto+Lhs5dKCin1nPFYl/iyIQSEbxmEeWW2X7IjnFVpiig+U3trGtwDMZ u5c3kQSgB9um+Hh7thO+p8s67tW8DfUqKQuU1WbJIFdPNMxyE1XoP6I0VUfdiogfr0Rl g/3MV6xSqyKa3ynE0s84HcYH8mcoaNlgr+qlb6lEhwGIA5V83HZjPif4JcTht+WXvnYp 0ZJZLexzQleDjiuqYuud0d9o7AY2kxWNzeV2NitXQIia2MEg+F6i7UrtsEOcM+BrTzYP csgi4B0SWYs5ACW5M3ISkv+a6IAn4SHnGUSOp+LAzK20RchSkweeKe31CEMKJt2APm0l PjFg== X-Received: by 10.236.21.198 with SMTP id r46mr16405499yhr.12.1368563806711; Tue, 14 May 2013 13:36:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.168 with SMTP id x8ls429046qed.75.gmail; Tue, 14 May 2013 13:36:46 -0700 (PDT) X-Received: by 10.52.88.2 with SMTP id bc2mr19722131vdb.27.1368563806392; Tue, 14 May 2013 13:36:46 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id p8si5825922vdv.148.2013.05.14.13.36.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 May 2013 13:36:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ia10so1099821vcb.41 for ; Tue, 14 May 2013 13:36:46 -0700 (PDT) X-Received: by 10.220.11.1 with SMTP id r1mr5185617vcr.14.1368563806167; Tue, 14 May 2013 13:36:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp78417vcb; Tue, 14 May 2013 13:36:45 -0700 (PDT) X-Received: by 10.180.88.231 with SMTP id bj7mr10175748wib.5.1368563804427; Tue, 14 May 2013 13:36:44 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id o18si6210285wiv.96.2013.05.14.13.36.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 14 May 2013 13:36:44 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1UcLxf-0005vS-6S; Tue, 14 May 2013 21:36:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [PATCH for-1.5] configure: Detect uuid on MacOSX (fixes compile failure) Date: Tue, 14 May 2013 21:36:39 +0100 Message-Id: <1368563799-22755-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQlKH9X9RlHVUalowEtqN1HBVX6muR32NaVXZOezJWepOEcIdX6VXJOT/xCMC2hfmQULTqNd X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 7791dba3ec broke compilation on MacOSX, because it introduced a new include of util.h. On MacOSX this includes pwd.h which in turn includes the system uuid/uuid.h, which causes a compile failure if QEMU was configured without CONFIG_UUID due to a conflict between the system header and our fallback versions: block/vdi.c:124:20: error: static declaration of 'uuid_generate' follows non-static declaration static inline void uuid_generate(uuid_t out) ^ /usr/include/uuid/uuid.h:63:6: note: previous declaration is here void uuid_generate(uuid_t out); ^ Fix this breakage by improving configure's check for uuid to work on MacOSX (where there is no need to link in a separate libuuid). Note that if the user explicitly runs configure with '--disable-uuid' on MacOSX then QEMU will fail to compile. Signed-off-by: Peter Maydell --- For 1.5 because the commit that broke us just went in today :-) configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index cab6332..29b5589 100755 --- a/configure +++ b/configure @@ -1948,6 +1948,8 @@ fi ########################################## # uuid_generate() probe, used for vdi block driver +# Note that on some systems (notably MacOSX) no extra library +# need be linked to get the uuid functions. if test "$uuid" != "no" ; then uuid_libs="-luuid" cat > $TMPC << EOF @@ -1959,7 +1961,9 @@ int main(void) return 0; } EOF - if compile_prog "" "$uuid_libs" ; then + if compile_prog "" "" ; then + uuid="yes" + elif compile_prog "" "$uuid_libs" ; then uuid="yes" libs_softmmu="$uuid_libs $libs_softmmu" libs_tools="$uuid_libs $libs_tools"