]> git.proxmox.com Git - mirror_qemu.git/commitdiff
configure: Fix build with capabilities
authorStefan Weil <sw@weilnetz.de>
Wed, 18 Jul 2012 14:10:20 +0000 (15:10 +0100)
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 31 Jul 2012 16:31:13 +0000 (22:01 +0530)
Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests
normally run with -Werror. Some of these tests now fail because they
raised a compiler warning.

This patch fixes support for capabilities.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
configure

index c65b5f6a55361f4daec1502143a51a223b0e9dfb..309aeac8157c746e2ca86bce2d6a77cc88ccfc62 100755 (executable)
--- a/configure
+++ b/configure
@@ -2084,7 +2084,7 @@ if test "$cap" != "no" ; then
   cat > $TMPC <<EOF
 #include <stdio.h>
 #include <sys/capability.h>
-int main(void) { cap_t caps; caps = cap_init(); }
+int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
 EOF
   if compile_prog "" "-lcap" ; then
     cap=yes