From: Stefan Weil <[email protected]>

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 <[email protected]>
Acked-by: Stefano Stabellini <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
---
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 268ed21..72d16a4 100755
--- 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
-- 
1.7.4.1


Reply via email to