SOURCES: nfs-utils-git-cel.patch (NEW) - build toolchain cleanups from Chuc...
baggins
baggins at pld-linux.org
Thu Mar 5 14:59:00 CET 2009
Author: baggins Date: Thu Mar 5 13:59:00 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- build toolchain cleanups from Chuck Lever's git
(git://git.linux-nfs.org/projects/cel/nfs-utils)
---- Files affected:
SOURCES:
nfs-utils-git-cel.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/nfs-utils-git-cel.patch
diff -u /dev/null SOURCES/nfs-utils-git-cel.patch:1.1
--- /dev/null Thu Mar 5 14:59:01 2009
+++ SOURCES/nfs-utils-git-cel.patch Thu Mar 5 14:58:55 2009
@@ -0,0 +1,905 @@
+commit 5245fa971d220896bfdb4f35f0c0d7dff8ea5e9b
+Author: Jeff Layton <jlayton at redhat.com>
+Date: Wed Mar 4 18:41:20 2009 -0500
+
+ nfs-utils: clean up handling of libgssglue in gssd Makefile
+
+ Make the pkgconfig check for libgssglue conditional on tirpc being
+ enabled. When it's disabled, the pkgconfig check for librpcsecgss will
+ pull in the gssglue lib and include dir automatically.
+
+ Also, make sure we include GSSGLUE_CFLAGS and the GSSGLUE_LIBS to the
+ appropriate places in utils/gssd/Makefile.am so that we pick up
+ the gssglue libs when tirpc is enabled.
+
+ Signed-off-by: Jeff Layton <jlayton at redhat.com>
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit a60410dcf62185f9f4abf2d8a77e638eea75e476
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:38:35 2009 -0500
+
+ nfs-utils: Include legacy or TI-RPC headers, not both
+
+ Data type incompatibilities between the legacy RPC headers and the
+ TI-RPC headers mean we can't use libtirpc with code that was compiled
+ against the legacy RPC headers. The definition of rpcprog_t for
+ example is "unsigned long" in the legacy library, but it's "uint32_t"
+ for TI-RPC. On 32-bit systems, these types happen to have the same
+ width, but on 64-bit systems they don't, making more complex data
+ structures that use these types in fields ABI incompatible.
+
+ Adopt a new strategy to deal with this issue. When --enable-tirpc is
+ set, append "-I/usr/include/tirpc" to the compilation steps. This
+ should cause the compiler to grab the tirpc/ headers instead of the
+ legacy headers. Now, for TI-RPC builds, the TI-RPC legacy functions
+ and the TI-RPC headers will be used. On legacy systems, the legacy
+ headers and legacy glibc RPC implementation will be used.
+
+ A new ./configure option is introduced to allow system integrators to
+ use TI-RPC headers in some other location than /usr/include/tirpc.
+ /usr/include/tirpc remains the default setting for this new option.
+
+ The gssd implementation presents a few challenges, but it turns out
+ the gssglue library is similar to the auth_gss pieces of TI-RPC. To
+ avoid similar header incompatibility issues, gssd now uses libtirpc
+ instead of libgssglue if --enable-tirpc is specified. There may be
+ other issues to tackle with gssd, but for now, we just make sure it
+ builds with --enable-tirpc.
+
+ Note also: svc_getcaller() is a macro in both cases that points to
+ a sockaddr field in the svc_req structure. The legacy version points
+ to a sockaddr_in type field, but the TI-RPC version points to a
+ sockaddr_in6 type field.
+
+ rpc.mountd unconditionally casts the result of svc_getcaller() to a
+ sockaddr_in *. This should be OK for TI-RPC as well, since rpc.mountd
+ still uses legacy RPC calls (provided by glibc, or emulated by TI-RPC)
+ to set up its listeners, and therefore rpc.mountd callers will always
+ be from AF_INET addresses for now.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit 4069fc444b9f50459abad1cd19cb6278ad76f81b
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:38:33 2009 -0500
+
+ configure: move IPv6 feature checks into aclocal/
+
+ Clean up: for consistency with other local feature checks, move IPv6
+ feature checks into aclocal/
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit d4cf713e88bdbf4bcad9c76d19f83828e3de9db2
+Author: Jeff Layton <jlayton at redhat.com>
+Date: Wed Mar 4 18:38:19 2009 -0500
+
+ nfs-utils: don't need extra libs to do AC_CHECK_LIBS for librpcsecgss
+
+ The conftest should work without these extra libs being included.
+
+ Signed-off-by: Jeff Layton <jlayton at redhat.com>
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit bff44d423f6e7c199deaaffb3a786f4878301dee
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:23:28 2009 -0500
+
+ configure: Move rpcsecgss checking into aclocal
+
+ Clean up: Introduce two more aclocal scripts for handling rpcsecgss
+ dependency checking.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit c25e45c7cdf64826a4ead9bd7d8ff11b98861d47
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:23:28 2009 -0500
+
+ configure: pull common nfsidmap and event checks into aclocal/
+
+ Clean up: Create an aclocal script for the nfsidmap library and
+ headers checks used for both --enable-gss and --enable-nfsv4.
+ Move libevent checks out too.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit a15242aa10c97bc5bc930266a7b87ab327b29307
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:23:28 2009 -0500
+
+ nfs-utils: replace function-specific switches with HAVE_LIBTIRPC
+
+ Instead of switching in TI-RPC-specific logic with a function-specific
+ switch like HAVE_CLNT_VG_CREATE, let's use the more generic
+ HAVE_LIBTIRPC macro everywhere.
+
+ This simplifies ./configure (always a good thing), and makes it more
+ clear in the source code exactly what the extra conditionally compiled
+ code is for.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit 33ea560291d280555ac2aacdbda561cf962f79c2
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:23:27 2009 -0500
+
+ configure: move TI-RPC checks into aclocal/
+
+ Define an aclocal test for TI-RPC headers and library, and move the
+ TI-RPC checks earlier in our configure script so other feature checks
+ can use the availability of TI-RPC to decide what to do.
+
+ Since bindresvport_sa is required just for IPv6 support, move that
+ check to the IPv6 feature tests.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+commit cf8c8619de71bd82c15bd9be00bc74a1edd29067
+Author: Chuck Lever <chuck.lever at oracle.com>
+Date: Wed Mar 4 18:23:27 2009 -0500
+
+ configure: add defensive quoting in some function checks
+
+ Clean up: Add proper m4 quoting in macros that check for the presence
+ of some functions in configure.ac.
+
+ Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 88ae210..b3a6e91 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -40,7 +40,12 @@ EXTRA_DIST = \
+ aclocal/bsdsignals.m4 \
+ aclocal/nfs-utils.m4 \
+ aclocal/kerberos5.m4 \
+- aclocal/tcp-wrappers.m4
++ aclocal/tcp-wrappers.m4 \
++ aclocal/libtirpc.m4 \
++ aclocal/libevent.m4 \
++ aclocal/libnfsidmap.m4 \
++ aclocal/rpcsec_vers.m4 \
++ aclocal/ipv6.m4
+
+ ACLOCAL_AMFLAGS = -I aclocal
+
+diff --git a/aclocal/ipv6.m4 b/aclocal/ipv6.m4
+new file mode 100644
+index 0000000..0564b3e
+--- /dev/null
++++ b/aclocal/ipv6.m4
+@@ -0,0 +1,29 @@
++dnl Checks for IPv6 support
++dnl
++AC_DEFUN([AC_IPV6], [
++
++ AC_CHECK_DECL([AI_ADDRCONFIG],
++ [AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
++ [Define this to 1 if AI_ADDRCONFIG macro is defined])], ,
++ [ #include <netdb.h> ])
++
++ if test "$enable_ipv6" = yes; then
++
++ dnl TI-RPC required for IPv6
++ if test "$enable_tirpc" = no; then
++ AC_MSG_ERROR(['--enable-ipv6' requires '--enable-tirpc'.])
++ fi
++
++ dnl IPv6-enabled networking functions required for IPv6
++ AC_CHECK_FUNCS([getnameinfo bindresvport_sa], , ,
++ [AC_MSG_ERROR([Missing functions needed for IPv6.])])
++
++ dnl Need to detect presence of IPv6 networking at run time via
++ dnl getaddrinfo(3); old versions of glibc do not support ADDRCONFIG
++ AC_CHECK_DECL([AI_ADDRCONFIG], ,
++ [AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support])],
++ [ #include <netdb.h> ])
++
++ fi
++
++])dnl
+diff --git a/aclocal/libevent.m4 b/aclocal/libevent.m4
+new file mode 100644
+index 0000000..3c962b3
+--- /dev/null
++++ b/aclocal/libevent.m4
+@@ -0,0 +1,11 @@
++dnl Checks for libevent
++AC_DEFUN([AC_LIBEVENT], [
++
++ dnl Check for libevent, but do not add -levent to LIBS
++ AC_CHECK_LIB([event], [event_dispatch], [libevent=1],
++ [AC_MSG_ERROR([libevent not found.])])
++
++ AC_CHECK_HEADERS([event.h], ,
++ [AC_MSG_ERROR([libevent headers not found.])])
++
++])dnl
+diff --git a/aclocal/libnfsidmap.m4 b/aclocal/libnfsidmap.m4
+new file mode 100644
+index 0000000..cfcde2f
+--- /dev/null
++++ b/aclocal/libnfsidmap.m4
+@@ -0,0 +1,17 @@
++dnl Checks for libnfsidmap
++dnl
++AC_DEFUN([AC_LIBNFSIDMAP], [
++
++ dnl Check for libnfsidmap, but do not add -lnfsidmap to LIBS
++ AC_CHECK_LIB([nfsidmap], [nfs4_init_name_mapping], [libnfsidmap=1],
++ [AC_MSG_ERROR([libnfsidmap not found.])])
++
++ AC_CHECK_HEADERS([nfsidmap.h], ,
++ [AC_MSG_ERROR([libnfsidmap headers not found.])])
++
++ dnl nfs4_set_debug() doesn't appear in all versions of libnfsidmap
++ AC_CHECK_LIB([nfsidmap], [nfs4_set_debug],
++ [AC_DEFINE([HAVE_NFS4_SET_DEBUG], 1,
++ [Define to 1 if you have the `nfs4_set_debug' function.])])
++
++])dnl
+diff --git a/aclocal/librpcsecgss.m4 b/aclocal/librpcsecgss.m4
+new file mode 100644
+index 0000000..d1dd25e
+--- /dev/null
++++ b/aclocal/librpcsecgss.m4
+@@ -0,0 +1,19 @@
++dnl Checks for rpcsecgss library and headers
++dnl KRB5LIBS must be set before this function is invoked.
++dnl
++AC_DEFUN([AC_LIBRPCSECGSS], [
++
++ dnl libtirpc provides an rpcsecgss API
++ if test "$enable_tirpc" = no; then
++
++ dnl Check for library, but do not add -lrpcsecgss to LIBS
++ AC_CHECK_LIB([rpcsecgss], [authgss_create_default], [librpcsecgss=1],
++ [AC_MSG_ERROR([librpcsecgss not found.])])
++
++ AC_CHECK_LIB([rpcsecgss], [authgss_set_debug_level],
++ [AC_DEFINE([HAVE_AUTHGSS_SET_DEBUG_LEVEL], 1,
++ [Define to 1 if you have the `authgss_set_debug_level' function.])])
++
++ fi
++
++])dnl
+diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
+new file mode 100644
+index 0000000..af4c7d3
+--- /dev/null
++++ b/aclocal/libtirpc.m4
+@@ -0,0 +1,28 @@
++dnl Checks for TI-RPC library and headers
++dnl
++AC_DEFUN([AC_LIBTIRPC], [
++
++ AC_ARG_WITH([tirpcinclude],
++ [AC_HELP_STRING([--with-tirpcinclude=DIR],
++ [use TI-RPC headers in DIR])],
++ [tirpc_header_dir=$withval],
++ [tirpc_header_dir=/usr/include/tirpc])
++
++ dnl if --enable-tirpc was specifed, the following components
++ dnl must be present, and we set up HAVE_ macros for them.
++
++ if test "$enable_tirpc" = yes; then
++
++ dnl look for the library; add to LIBS if found
++ AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
++ [AC_MSG_ERROR([libtirpc not found.])])
++
++ dnl also must have the headers installed where we expect
++ dnl look for headers; add -I compiler option if found
++ AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], ,
++ [AC_MSG_ERROR([libtirpc headers not found.])])
++ AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])
++
++ fi
++
++])dnl
+diff --git a/aclocal/rpcsec_vers.m4 b/aclocal/rpcsec_vers.m4
+new file mode 100644
+index 0000000..e59c0aa
+--- /dev/null
++++ b/aclocal/rpcsec_vers.m4
+@@ -0,0 +1,12 @@
++dnl Checks librpcsec version
++AC_DEFUN([AC_RPCSEC_VERSION], [
++
++ dnl TI-RPC replaces librpcsecgss, but we still need libgssglue
++ if test "$enable_tirpc" = no; then
++ PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.16], ,
++ [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])])
++ else
++ PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.1])
++ fi
++
++])dnl
+diff --git a/configure.ac b/configure.ac
+index b2c8190..ce5d308 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -118,6 +118,11 @@ AC_ARG_ENABLE(mount,
+ enable_mount=$enableval,
+ enable_mount=yes)
+ AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
++AC_ARG_ENABLE(tirpc,
++ [AC_HELP_STRING([--enable-tirpc],
++ [enable use of TI-RPC @<:@default=no@:>@])],
++ enable_tirpc=$enableval,
++ enable_tirpc=no)
+ AC_ARG_ENABLE(ipv6,
+ [AC_HELP_STRING([--enable-ipv6],
+ [enable support for IPv6 @<:@default=no@:>@])],
+@@ -131,13 +136,8 @@ AC_ARG_ENABLE(ipv6,
+ AC_SUBST(enable_ipv6)
+ AM_CONDITIONAL(CONFIG_IPV6, [test "$enable_ipv6" = "yes"])
+
+-AC_ARG_ENABLE(tirpc,
+- [AC_HELP_STRING([--enable-tirpc],
+- [enable use of TI-RPC @<:@default=no@:>@])],
+- enable_tirpc=$enableval,
+- enable_tirpc=no)
+- AC_SUBST(enable_tirpc)
+- AM_CONDITIONAL(CONFIG_TIRPC, [test "$enable_tirpc" = "yes"])
++dnl Check for TI-RPC library and headers
++AC_LIBTIRPC
+
+ # Check whether user wants TCP wrappers support
+ AC_TCP_WRAPPERS
+@@ -176,39 +176,40 @@ AC_BSD_SIGNALS
+ dnl *************************************************************
+ dnl * Check for required libraries
+ dnl *************************************************************
+-AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"])])
++
++AC_CHECK_FUNC([gethostbyname], ,
++ [AC_CHECK_LIB([nsl], [gethostbyname], [LIBNSL="-lnsl"])])
+ AC_SUBST(LIBNSL)
+
+-AC_CHECK_FUNC(connect, ,
+- AC_CHECK_LIB(socket, connect, [LIBSOCKET="-lsocket"],
+- AC_MSG_ERROR(Function 'socket' not found.), $LIBNSL))
++AC_CHECK_FUNC([connect], ,
++ [AC_CHECK_LIB([socket], [connect], [LIBSOCKET="-lsocket"],
++ [AC_MSG_ERROR([Function 'socket' not found.])], [$LIBNSL])])
++
++AC_CHECK_FUNC([getaddrinfo], , ,
++ [AC_MSG_ERROR([Function 'getaddrinfo' not found.])])
+
+-AC_CHECK_FUNC(getaddrinfo, , ,
+- AC_MSG_ERROR(Function 'getaddrinfo' not found.))
++AC_CHECK_FUNC([getrpcbynumber], , ,
++ [AC_MSG_ERROR([Function 'getrpcbynumber' not found.])])
+
+-AC_CHECK_FUNC(getrpcbynumber, , ,
+- AC_MSG_ERROR(Function 'getrpcbynumber' not found.))
++AC_CHECK_FUNC([getservbyname], , ,
++ [AC_MSG_ERROR([Function 'getservbyname' not found.])])
+
+-AC_CHECK_FUNC(getservbyname, , ,
+- AC_MSG_ERROR(Function 'getservbyname' not found.))
++AC_CHECK_LIB([crypt], [crypt], [LIBCRYPT="-lcrypt"])
+
+-AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])
+ if test "$enable_nfsv4" = yes; then
+- AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
+- AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+- AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
+- AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+- dnl librpcsecgss already has a dependency on libgssapi,
+- dnl but we need to make sure we get the right version
+- if test "$enable_gss" = yes; then
+- PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.16, ,
+- [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
+- ]
+- )
+- PKG_CHECK_MODULES(GSSGLUE, libgssglue >= 0.1)
+- fi
++ dnl check for libevent libraries and headers
++ AC_LIBEVENT
++
++ dnl check for nfsidmap libraries and headers
++ AC_LIBNFSIDMAP
+
++ dnl librpcsecgss already has a dependency on libgssapi,
++ dnl but we need to make sure we get the right version
++ if test "$enable_gss" = yes; then
++ AC_RPCSEC_VERSION
++ fi
+ fi
++
+ if test "$knfsd_cv_glibc2" = no; then
+ AC_CHECK_LIB(bsd, daemon, [LIBBSD="-lbsd"])
+ fi
+@@ -236,49 +237,21 @@ AC_SUBST(LIBBLKID)
+
+ 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]),)
++ AC_LIBNFSIDMAP
++
++ AC_CHECK_HEADERS([spkm3.h], ,
++ [AC_MSG_WARN([Could not locate SPKM3 header; will not have SPKM3 support])])
+
+ dnl Check for Kerberos V5
+ AC_KERBEROS_V5
+
+- dnl This is not done until here because we need to have KRBLIBS set
+- dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
+- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssglue -ldl)
+- AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
+- AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssglue -ldl)
++ dnl Invoked after AC_KERBEROS_V5; AC_LIBRPCSECGSS needs to have KRBLIBS set
++ AC_LIBRPCSECGSS
+
+ fi
+
+-AC_CHECK_DECL([AI_ADDRCONFIG],
+- AC_DEFINE([HAVE_DECL_AI_ADDRCONFIG], 1,
+- [Define this to 1 if AI_ADDRCONFIG macro is defined]), ,
+- [ #include <netdb.h> ] )
+-
+-if test "$enable_tirpc" = yes; then
+- AC_CHECK_LIB(tirpc, clnt_tli_create, ,
+- AC_MSG_ERROR([libtirpc not found.]))
+- AC_CHECK_HEADERS(tirpc/netconfig.h, ,
+- AC_MSG_ERROR([libtirpc headers not found.]))
+- AC_CHECK_FUNCS([bindresvport_sa getnetconfig \
+- clnt_create clnt_create_timed \
+- clnt_vc_create clnt_dg_create xdr_rpcb])
+-fi
+-
+-if test "$enable_ipv6" = yes; then
+- if test "$enable_tirpc" = no; then
+- AC_MSG_ERROR('--enable-ipv6' requires '--enable-tirpc'.)
+- fi
+- AC_CHECK_FUNC(getnameinfo, , ,
+- AC_MSG_ERROR(Function 'getnameinfo' not found.))
+- AC_CHECK_DECL([AI_ADDRCONFIG], ,
+- AC_MSG_ERROR([full getaddrinfo(3) implementation needed for IPv6 support]),
+- [ #include <netdb.h> ] )
+-fi
++dnl Check for IPv6 support
++AC_IPV6
+
+ dnl *************************************************************
+ dnl Check for headers
+diff --git a/support/nfs/getport.c b/support/nfs/getport.c
+index 5da1749..734d21a 100644
+--- a/support/nfs/getport.c
++++ b/support/nfs/getport.c
+@@ -40,9 +40,9 @@
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+
+-#ifdef HAVE_TIRPC_NETCONFIG_H
+-#include <tirpc/netconfig.h>
+-#include <tirpc/rpc/rpcb_prot.h>
++#ifdef HAVE_LIBTIRPC
++#include <netconfig.h>
++#include <rpc/rpcb_prot.h>
+ #endif
+
+ #include "nfsrpc.h"
+@@ -53,17 +53,17 @@
+ * Rpcbind's local socket service does not seem to be working.
+ * Disable this logic for now.
+ */
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+ #undef NFS_GP_LOCAL
+-#else /* HAVE_XDR_RPCB */
++#else /* !HAVE_LIBTIRPC */
+ #undef NFS_GP_LOCAL
+-#endif /* HAVE_XDR_RPCB */
++#endif /* !HAVE_LIBTIRPC */
+
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+ const static rpcvers_t default_rpcb_version = RPCBVERS_4;
+-#else
++#else /* !HAVE_LIBTIRPC */
+ const static rpcvers_t default_rpcb_version = PMAPVERS;
+-#endif
++#endif /* !HAVE_LIBTIRPC */
+
+ #ifdef HAVE_DECL_AI_ADDRCONFIG
+ /*
+@@ -242,7 +242,7 @@ static CLIENT *nfs_gp_get_rpcbclient(const struct sockaddr *sap,
+ * Returns a '\0'-terminated string if successful; otherwise NULL.
+ * rpc_createerr.cf_stat is set to reflect the error.
+ */
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+
+ static char *nfs_gp_get_netid(const sa_family_t family,
+ const unsigned short protocol)
+@@ -290,7 +290,7 @@ out:
+ return NULL;
+ }
+
+-#endif /* HAVE_XDR_RPCB */
++#endif /* HAVE_LIBTIRPC */
+
+ /*
+ * Extract a port number from a universal address, and terminate the
+@@ -453,7 +453,7 @@ static int nfs_gp_ping(CLIENT *client, struct timeval timeout)
+ return (int)(status == RPC_SUCCESS);
+ }
+
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+
+ /*
+ * Initialize the rpcb argument for a GETADDR request.
+@@ -565,7 +565,7 @@ static unsigned short nfs_gp_rpcb_getaddr(CLIENT *client,
+ return port;
+ }
+
+-#endif /* HAVE_XDR_RPCB */
++#endif /* HAVE_LIBTIRPC */
+
+ /*
+ * Try GETPORT request via rpcbind version 2.
+@@ -595,7 +595,7 @@ static unsigned long nfs_gp_pmap_getport(CLIENT *client,
+ return port;
+ }
+
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+
+ static unsigned short nfs_gp_getport_rpcb(CLIENT *client,
+ const struct sockaddr *sap,
+@@ -617,7 +617,7 @@ static unsigned short nfs_gp_getport_rpcb(CLIENT *client,
+ return port;
+ }
+
+-#endif /* HAVE_XDR_RPCB */
++#endif /* HAVE_LIBTIRPC */
+
+ static unsigned long nfs_gp_getport_pmap(CLIENT *client,
+ const rpcprog_t program,
+@@ -652,11 +652,11 @@ static unsigned short nfs_gp_getport(CLIENT *client,
+ struct timeval timeout)
+ {
+ switch (sap->sa_family) {
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+ case AF_INET6:
+ return nfs_gp_getport_rpcb(client, sap, salen, program,
+ version, protocol, timeout);
+-#endif /* HAVE_XDR_RPCB */
++#endif /* HAVE_LIBTIRPC */
+ case AF_INET:
+ return nfs_gp_getport_pmap(client, program, version,
+ protocol, timeout);
+@@ -922,7 +922,7 @@ unsigned short nfs_getlocalport(const rpcprot_t program,
+ * address of the same address family. In this way an RPC server can
+ * advertise via rpcbind that it does not support AF_INET6.
+ */
+-#ifdef HAVE_XDR_RPCB
++#ifdef HAVE_LIBTIRPC
+
+ unsigned short nfs_rpcb_getaddr(const struct sockaddr *sap,
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list