From a07343ee0da4f0974a23b673ae1b0d482c7426a1 Mon Sep 17 00:00:00 2001 From: Greg Banks Date: Thu, 22 Jun 2006 17:31:24 +1000 Subject: [PATCH] Detect presence of nfs4_set_debug() in libnfsidmap and don't bother calling it if it's missing. --- configure.in | 4 ++++ utils/idmapd/idmapd.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure.in b/configure.in index 9a392e8..1a1a25d 100644 --- a/configure.in +++ b/configure.in @@ -180,6 +180,10 @@ if test "$enable_gss" = yes; then dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support])) AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support])) + dnl the nfs4_set_debug function doesn't appear in all version of the library + AC_CHECK_LIB(nfsidmap, nfs4_set_debug, + AC_DEFINE(HAVE_NFS4_SET_DEBUG,1, + [Whether nfs4_set_debug() is present in libnfsidmap]),) dnl Check for Kerberos V5 AC_KERBEROS_V5 diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c index 158feaf..c8ce6b2 100644 --- a/utils/idmapd/idmapd.c +++ b/utils/idmapd/idmapd.c @@ -345,7 +345,9 @@ main(int argc, char **argv) errx(1, "Could not find group \"%s\"", nobodygroup); nobodygid = gr->gr_gid; +#ifdef HAVE_NFS4_SET_DEBUG nfs4_set_debug(verbose, idmapd_warnx); +#endif if (conf_path == NULL) conf_path = _PATH_IDMAPDCONF; if (nfs4_init_name_mapping(conf_path)) -- 2.39.2