public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@debian.org>
To: xfs@oss.sgi.com
Subject: [patch] xfsprogs: extend fiemap configure check
Date: Wed, 1 Feb 2012 10:11:16 +1100 (EST)	[thread overview]
Message-ID: <1247398017.69749.1328051476851.JavaMail.root@acxmail-au2.aconex.com> (raw)
In-Reply-To: <519369070.69746.1328051417713.JavaMail.root@acxmail-au2.aconex.com>

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

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.

Signed-off-by: Nathan Scott <nathans@debian.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fiemap.patch --]
[-- Type: text/x-patch; name=fiemap.patch, Size: 721 bytes --]

diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 8192181..1e2c256 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 <linux/fs.h>
+#include <linux/fiemap.h>
+    ], [
+         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)
   ])

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

       reply	other threads:[~2012-01-31 23:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <519369070.69746.1328051417713.JavaMail.root@acxmail-au2.aconex.com>
2012-01-31 23:11 ` Nathan Scott [this message]
2012-02-02 11:36   ` [patch] xfsprogs: extend fiemap configure check Christoph Hellwig
2012-02-02 22:52   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247398017.69749.1328051476851.JavaMail.root@acxmail-au2.aconex.com \
    --to=nathans@debian.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox