From: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Subject: [nfs-utils] mountd: Add check for 'struct file_handle'
Date: Tue, 2 Feb 2016 14:33:27 +0100 [thread overview]
Message-ID: <1454420007-11486-1-git-send-email-maxime.hadjinlian@gmail.com> (raw)
The code to check if name_to_handle_at() is implemented generates only a
warning but with some toolchain it doesn't fail to link (the function must be
implemented somewhere).
However the "struct file_handle" type is not available.
So, this patch adds a check for this struct.
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
configure.ac | 1 +
utils/mountd/cache.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 25d2ba4..a7965bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -425,6 +425,7 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
+AC_CHECK_TYPES([struct file_handle])
dnl *************************************************************
dnl Check for functions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index 7847446..179ea18 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -424,7 +424,7 @@ static int same_path(char *child, char *parent, int len)
if (count_slashes(p) != count_slashes(parent))
return 0;
-#if HAVE_NAME_TO_HANDLE_AT
+#if defined(HAVE_NAME_TO_HANDLE_AT) && defined(HAVE_STRUCT_FILE_HANDLE)
struct {
struct file_handle fh;
unsigned char handle[128];
--
2.7.0
reply other threads:[~2016-02-02 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1454420007-11486-1-git-send-email-maxime.hadjinlian@gmail.com \
--to=maxime.hadjinlian@gmail.com \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).