]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
configure: Fix build for some versions of glibc (9pfs)
authorStefan Weil <sw@weilnetz.de>
Wed, 6 Jun 2012 19:35:57 +0000 (19:35 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 25 Jun 2012 13:54:44 +0000 (08:54 -0500)
Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
Extend the check in configure to test both preconditions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
(cherry picked from commit acc55ba8b1519bda27be19fad50b65d2b0c7d26d)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
configure

index 268ed21b69bebc8a2e4dabbe93bd1c78fface134..72d16a495b18c8302e63991e4bd0bbc7e23f4cc5 100755 (executable)
--- a/configure
+++ b/configure
@@ -2811,7 +2811,11 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
+#if !defined(AT_EMPTY_PATH)
+# error missing definition
+#else
 int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
+#endif
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes