Skip to contentSkip to conversation

configure: Fix configure error with --enable-virtfs

PATCH New Aneesh Kumar K.V 1 participant 1 message Jul 31, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix configure error with --enable-virtfs

From: "Aneesh Kumar K.V" <[email protected]>

This fix the below error on ubuntu 12.04

a.c: In function ‘main’:
a.c:3:24: error: variable ‘caps’ set but not used [-Werror=unused-but-set-variable] a.c:3:1: error: control reaches end of non-void function [-Werror=return-type]

---
 configure |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
index c65b5f6..749bd8b 100755
@@ -2084,7 +2084,11 @@ 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_init();
+    return 0;
+}
 EOF
   if compile_prog "" "-lcap" ; then
     cap=yes
Signature · 1 line
1.7.10