Patchwork [03/11] configure: Fix build with capabilities

login
register
mail settings
Submitter Peter Maydell
Date July 18, 2012, 2:10 p.m.
Message ID <1342620628-12751-4-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/171704/
State New
Headers show

Comments

Peter Maydell - July 18, 2012, 2:10 p.m.
From: Stefan Weil <sw@weilnetz.de>

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>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/configure b/configure
index 63156a7..feadbe7 100755
--- a/configure
+++ b/configure
@@ -2083,7 +2083,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