From 2912da5d2915122e432bb61bd5ab62db7ee93d93 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 1 Feb 2012 10:11:16 +1100 Subject: [PATCH] xfsprogs: extend fiemap configure check Make the fiemap configure check consistent with the other libc interface checks - perform a compile and link with a complete set of symbols, macros and interfaces needed, as opposed to a build with just the headers. Reviewed-by: Dave Chinner Signed-off-by: Nathan Scott Signed-off-by: Christoph Hellwig --- m4/package_libcdev.m4 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 8192181a5..1e2c256b3 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -121,6 +121,17 @@ AC_DEFUN([AC_HAVE_FALLOCATE], # Check if we have the fiemap ioctl (Linux) # AC_DEFUN([AC_HAVE_FIEMAP], - [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=yes ], [ have_fiemap=no ]) + [ AC_MSG_CHECKING([for fiemap]) + AC_TRY_LINK([ +#define _GNU_SOURCE +#define _FILE_OFFSET_BITS 64 +#include +#include + ], [ + struct fiemap *fiemap; + ioctl(0, FS_IOC_FIEMAP, (unsigned long)fiemap); + ], have_fiemap=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) AC_SUBST(have_fiemap) ]) -- 2.47.2