Patchwork [2/8] configure: Update configure so that open_by_handle_at check returns correct value

login
register
mail settings
Submitter Aneesh Kumar K.V
Date Oct. 20, 2011, 4:17 p.m.
Message ID <1319127460-5181-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/120836/
State New
Headers show

Comments

Aneesh Kumar K.V - Oct. 20, 2011, 4:17 p.m.
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

According to David Gibson for some compiler/libc combinations, open_by_handle_at
test in configure isn't quite right: because the file_handle pointer is never
dereferenced, gcc doesn't complain even if it is undefined. Change the test
as suggested by him.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/configure b/configure
index 4f87e0a..19e8394 100755
--- a/configure
+++ b/configure
@@ -2562,7 +2562,7 @@  fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
-int main(void) { struct file_handle *fh; open_by_handle_at(0, fh, 0); }
+int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes