Minor changes to improve compatibility with older FreeBSD releases.
This commit is contained in:
parent
96a6e6e6ca
commit
ee31b83a3a
@ -8,7 +8,7 @@
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include "nlm_prot.h"
|
||||
#include <nlm/nlm_prot.h>
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
|
||||
|
@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/lockf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
#if __FreeBSD_version >= 700000
|
||||
#include <sys/priv.h>
|
||||
#endif
|
||||
#include <sys/proc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
@ -49,9 +51,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include "nlm_prot.h"
|
||||
#include "sm_inter.h"
|
||||
#include "nlm.h"
|
||||
#include <nlm/nlm_prot.h>
|
||||
#include <nlm/sm_inter.h>
|
||||
#include <nlm/nlm.h>
|
||||
#include <rpc/rpc_com.h>
|
||||
#include <rpc/rpcb_prot.h>
|
||||
|
||||
@ -79,7 +81,14 @@ SYSCTL_NODE(_vfs_nlm, OID_AUTO, sysid, CTLFLAG_RW, NULL, "");
|
||||
*/
|
||||
static int nlm_syscall_offset = SYS_nlm_syscall;
|
||||
static struct sysent nlm_syscall_prev_sysent;
|
||||
#if __FreeBSD_version < 700000
|
||||
static struct sysent nlm_syscall_sysent = {
|
||||
(sizeof(struct nlm_syscall_args) / sizeof(register_t)) | SYF_MPSAFE,
|
||||
(sy_call_t *) nlm_syscall
|
||||
};
|
||||
#else
|
||||
MAKE_SYSENT(nlm_syscall);
|
||||
#endif
|
||||
static bool_t nlm_syscall_registered = FALSE;
|
||||
|
||||
/*
|
||||
@ -1209,7 +1218,11 @@ nlm_syscall(struct thread *td, struct nlm_syscall_args *uap)
|
||||
{
|
||||
int error;
|
||||
|
||||
#if __FreeBSD_version >= 700000
|
||||
error = priv_check(td, PRIV_NFS_LOCKD);
|
||||
#else
|
||||
error = suser(td);
|
||||
#endif
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
|
@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include "nlm_prot.h"
|
||||
#include "nlm.h"
|
||||
#include <nlm/nlm_prot.h>
|
||||
#include <nlm/nlm.h>
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include "nlm_prot.h"
|
||||
#include "nlm.h"
|
||||
#include <nlm/nlm_prot.h>
|
||||
#include <nlm/nlm.h>
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
|
@ -3,7 +3,7 @@
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include "nlm_prot.h"
|
||||
#include <nlm/nlm_prot.h>
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include "sm_inter.h"
|
||||
#include <nlm/sm_inter.h>
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/xdr.h>
|
||||
#include <rpc/auth.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
/* auth_unix.c */
|
||||
static void authunix_nextverf (AUTH *);
|
||||
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/xdr.h>
|
||||
#include <rpc/auth.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
/* gids compose part of a credential; there may not be more than 16 of them */
|
||||
#define NGRPS 16
|
||||
|
@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
|
||||
#ifdef _FREEFALL_CONFIG
|
||||
|
@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
static enum clnt_stat clnt_reconnect_call(CLIENT *, rpcproc_t,
|
||||
xdrproc_t, void *, xdrproc_t, void *, struct timeval);
|
||||
|
@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
#define MCALL_MSG_SIZE 24
|
||||
|
||||
|
@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
/*%
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
|
@ -27,7 +27,11 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
#if __FreeBSD_version < 700000
|
||||
#define strchr index
|
||||
#endif
|
||||
|
||||
/*%
|
||||
* WARNING: Don't even consider trying to compile this on a system where
|
||||
|
@ -58,7 +58,11 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/nettype.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
#if __FreeBSD_version < 700000
|
||||
#define strrchr rindex
|
||||
#endif
|
||||
|
||||
struct handle {
|
||||
NCONF_HANDLE *nhandle;
|
||||
|
@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpcb_clnt.h>
|
||||
#include <rpc/rpcb_prot.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
static struct timeval tottimeout = { 60, 0 };
|
||||
static const struct timeval rmttimeout = { 3, 0 };
|
||||
|
@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/rpcb_clnt.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
#define SVC_VERSQUIET 0x0001 /* keep quiet about vers mismatch */
|
||||
#define version_keepquiet(xp) ((u_long)(xp)->xp_p3 & SVC_VERSQUIET)
|
||||
|
@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
#define MAX_MACHINE_NAME 255
|
||||
#define NGRPS 16
|
||||
|
@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
static enum xprt_stat svc_dg_stat(SVCXPRT *);
|
||||
static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *);
|
||||
|
@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpcb_clnt.h>
|
||||
#include <rpc/nettype.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
extern int __svc_vc_setflag(SVCXPRT *, int);
|
||||
|
||||
|
@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#include "rpc_com.h"
|
||||
#include <rpc/rpc_com.h>
|
||||
|
||||
static bool_t svc_vc_rendezvous_recv(SVCXPRT *, struct rpc_msg *);
|
||||
static enum xprt_stat svc_vc_rendezvous_stat(SVCXPRT *);
|
||||
|
Loading…
Reference in New Issue
Block a user