]> 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)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 31 Jul 2012 20:05:37 +0000 (20:05 +0000)
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: Blue Swirl <blauwirbel@gmail.com>
configure

index 0a2226bb7e40761a73cf7d9a727d4a9a30272d15..ec95819f6eb9092e2fabe42586ac80ae4498a533 100755 (executable)
--- a/configure
+++ b/configure
@@ -2085,7 +2085,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