chiark / gitweb /
build-sys: check for name_to_handle_at declaration instead of its definition
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 9 Oct 2012 12:58:51 +0000 (14:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Oct 2012 23:30:29 +0000 (01:30 +0200)
AC_CHECK_FUNCS may be successful, even though name_to_handle_at and
'struct file_handle'  are not available.

configure.ac
src/shared/missing.h

index 09818d6ec033b4fb712364bb57fe6f0a00b402e0..fe8137d81848951f97766d5232e54f04924deec4 100644 (file)
@@ -174,11 +174,12 @@ CAP_LIBS="$LIBS"
 LIBS="$save_LIBS"
 AC_SUBST(CAP_LIBS)
 
-AC_CHECK_FUNCS([fanotify_init fanotify_mark name_to_handle_at])
+AC_CHECK_FUNCS([fanotify_init fanotify_mark])
 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
-AC_CHECK_DECLS([gettid, pivot_root], [], [], [[#include <sys/types.h>
+AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at], [], [], [[#include <sys/types.h>
 #include <unistd.h>
-#include <sys/mount.h>]])
+#include <sys/mount.h>
+#include <fcntl.h>]])
 
 # This makes sure pkg.m4 is available.
 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
index 14abe4ee2eacf95223f4d470c28130af0e200de3..1a31066032e7de740ab21116fbf3b8dbae86b7d9 100644 (file)
@@ -218,7 +218,7 @@ static inline pid_t gettid(void) {
 #  endif
 #endif
 
-#ifndef HAVE_NAME_TO_HANDLE_AT
+#if !HAVE_DECL_NAME_TO_HANDLE_AT
 struct file_handle {
         unsigned int handle_bytes;
         int handle_type;