build-sys: check for name_to_handle_at declaration instead of its definition

AC_CHECK_FUNCS may be successful, even though name_to_handle_at and
'struct file_handle'  are not available.
This commit is contained in:
Michael Olbrich 2012-10-09 14:58:51 +02:00 committed by Lennart Poettering
parent 7e505069d2
commit 9388e99e20
2 changed files with 5 additions and 4 deletions

View 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])

View 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;