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: 243826 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0714D2C00B5 for ; Wed, 15 May 2013 06:37:15 +1000 (EST) Received: from localhost ([::1]:50983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcLyD-00014V-0T for incoming@patchwork.ozlabs.org; Tue, 14 May 2013 16:37:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcLxn-00014N-O2 for qemu-devel@nongnu.org; Tue, 14 May 2013 16:36:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcLxl-0004pl-0C for qemu-devel@nongnu.org; Tue, 14 May 2013 16:36:47 -0400 Received: from 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]:56902 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcLxk-0004pa-PZ for qemu-devel@nongnu.org; Tue, 14 May 2013 16:36:44 -0400 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 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-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Paolo Bonzini , Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org Subject: [Qemu-devel] [PATCH for-1.5] configure: Detect uuid on MacOSX (fixes compile failure) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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"