X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fnfsmount.c;h=6355681d4b520eeb3bdeacb26ed81cf797ea33cc;hp=6a045184d55648f7ec156d8b994f1fa97470338b;hb=dd0761b4852d9946efa86c7403e45b937462503f;hpb=5fb4042ce4eb4fd5e50e3fb0f78bbd20b4d46e78 diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c index 6a04518..6355681 100644 --- a/utils/mount/nfsmount.c +++ b/utils/mount/nfsmount.c @@ -67,6 +67,14 @@ #include "nls.h" #include "error.h" #include "network.h" +#include "version.h" + +#ifdef HAVE_RPCSVC_NFS_PROT_H +#include +#else +#include +#define nfsstat nfs_stat +#endif #ifndef NFS_PORT #define NFS_PORT 2049 @@ -95,8 +103,6 @@ extern char *progname; extern int verbose; extern int sloppy; -extern int linux_version_code(void); - static inline enum clnt_stat nfs3_mount(CLIENT *clnt, mnt3arg_t *mnt3arg, mnt3res_t *mnt3res) { @@ -808,7 +814,7 @@ noauth_flavors: * to avoid problems with multihomed hosts. * --Swen */ - if (linux_version_code() <= 0x01030a && fsock != -1 + if (linux_version_code() <= MAKE_VERSION(1, 3, 10) && fsock != -1 && connect(fsock, (struct sockaddr *) nfs_saddr, sizeof (*nfs_saddr)) < 0) { perror(_("nfs connect"));