diff --git a/sys/nlm/nlm_prot_clnt.c b/sys/nlm/nlm_prot_clnt.c index b3ae5d8935a0..9a16e32a9106 100644 --- a/sys/nlm/nlm_prot_clnt.c +++ b/sys/nlm/nlm_prot_clnt.c @@ -8,7 +8,7 @@ #include #include -#include "nlm_prot.h" +#include #include #ifndef lint /*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/ diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c index 528f8a0e9dea..a799414c7493 100644 --- a/sys/nlm/nlm_prot_impl.c +++ b/sys/nlm/nlm_prot_impl.c @@ -36,7 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 700000 #include +#endif #include #include #include @@ -49,9 +51,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "nlm_prot.h" -#include "sm_inter.h" -#include "nlm.h" +#include +#include +#include #include #include @@ -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); diff --git a/sys/nlm/nlm_prot_server.c b/sys/nlm/nlm_prot_server.c index 3e4499df8451..320680ad5e6b 100644 --- a/sys/nlm/nlm_prot_server.c +++ b/sys/nlm/nlm_prot_server.c @@ -37,8 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "nlm_prot.h" -#include "nlm.h" +#include +#include /**********************************************************************/ diff --git a/sys/nlm/nlm_prot_svc.c b/sys/nlm/nlm_prot_svc.c index eca6d8668f6f..3b1a140d4737 100644 --- a/sys/nlm/nlm_prot_svc.c +++ b/sys/nlm/nlm_prot_svc.c @@ -28,8 +28,8 @@ #include #include -#include "nlm_prot.h" -#include "nlm.h" +#include +#include #include #ifndef lint diff --git a/sys/nlm/nlm_prot_xdr.c b/sys/nlm/nlm_prot_xdr.c index 034cbbca237d..d0a6c89eef9b 100644 --- a/sys/nlm/nlm_prot_xdr.c +++ b/sys/nlm/nlm_prot_xdr.c @@ -3,7 +3,7 @@ * It was generated using rpcgen. */ -#include "nlm_prot.h" +#include #include #ifndef lint /*static char sccsid[] = "from: @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro";*/ diff --git a/sys/nlm/sm_inter_xdr.c b/sys/nlm/sm_inter_xdr.c index 5f754322d1db..b225078d06ff 100644 --- a/sys/nlm/sm_inter_xdr.c +++ b/sys/nlm/sm_inter_xdr.c @@ -3,7 +3,7 @@ * It was generated using rpcgen. */ -#include "sm_inter.h" +#include #include __FBSDID("$FreeBSD$"); diff --git a/sys/rpc/auth_unix.c b/sys/rpc/auth_unix.c index 57824007d2ac..a2f5fd20b395 100644 --- a/sys/rpc/auth_unix.c +++ b/sys/rpc/auth_unix.c @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include /* auth_unix.c */ static void authunix_nextverf (AUTH *); diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index 67ab7fb4a6db..3092b1ff6126 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include /* gids compose part of a credential; there may not be more than 16 of them */ #define NGRPS 16 diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c index 87c4aa4acb82..c66ac50003b4 100644 --- a/sys/rpc/clnt_dg.c +++ b/sys/rpc/clnt_dg.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include #ifdef _FREEFALL_CONFIG diff --git a/sys/rpc/clnt_rc.c b/sys/rpc/clnt_rc.c index e7674101a7e6..ab93773bb5ce 100644 --- a/sys/rpc/clnt_rc.c +++ b/sys/rpc/clnt_rc.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include static enum clnt_stat clnt_reconnect_call(CLIENT *, rpcproc_t, xdrproc_t, void *, xdrproc_t, void *, struct timeval); diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c index a92d800a97a1..5731e1e0070c 100644 --- a/sys/rpc/clnt_vc.c +++ b/sys/rpc/clnt_vc.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include #define MCALL_MSG_SIZE 24 diff --git a/sys/rpc/inet_ntop.c b/sys/rpc/inet_ntop.c index 2043be34f74a..d093a970345b 100644 --- a/sys/rpc/inet_ntop.c +++ b/sys/rpc/inet_ntop.c @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include /*% * WARNING: Don't even consider trying to compile this on a system where diff --git a/sys/rpc/inet_pton.c b/sys/rpc/inet_pton.c index 49bf9578438e..943fad7c6bd1 100644 --- a/sys/rpc/inet_pton.c +++ b/sys/rpc/inet_pton.c @@ -27,7 +27,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include + +#if __FreeBSD_version < 700000 +#define strchr index +#endif /*% * WARNING: Don't even consider trying to compile this on a system where diff --git a/sys/rpc/rpc_generic.c b/sys/rpc/rpc_generic.c index 8d4c80f87e2a..ee8ee8a4806b 100644 --- a/sys/rpc/rpc_generic.c +++ b/sys/rpc/rpc_generic.c @@ -58,7 +58,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include + +#if __FreeBSD_version < 700000 +#define strrchr rindex +#endif struct handle { NCONF_HANDLE *nhandle; diff --git a/sys/rpc/rpcb_clnt.c b/sys/rpc/rpcb_clnt.c index cf47f70a0941..ac3a3127f7c8 100644 --- a/sys/rpc/rpcb_clnt.c +++ b/sys/rpc/rpcb_clnt.c @@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include static struct timeval tottimeout = { 60, 0 }; static const struct timeval rmttimeout = { 3, 0 }; diff --git a/sys/rpc/svc.c b/sys/rpc/svc.c index 8be980552608..d6d6d7826c49 100644 --- a/sys/rpc/svc.c +++ b/sys/rpc/svc.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include #define SVC_VERSQUIET 0x0001 /* keep quiet about vers mismatch */ #define version_keepquiet(xp) ((u_long)(xp)->xp_p3 & SVC_VERSQUIET) diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 3b6969d7da0c..9c6cdd78fdcb 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include -#include "rpc_com.h" +#include #define MAX_MACHINE_NAME 255 #define NGRPS 16 diff --git a/sys/rpc/svc_dg.c b/sys/rpc/svc_dg.c index 08d59477446a..666b952ee894 100644 --- a/sys/rpc/svc_dg.c +++ b/sys/rpc/svc_dg.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include -#include "rpc_com.h" +#include static enum xprt_stat svc_dg_stat(SVCXPRT *); static bool_t svc_dg_recv(SVCXPRT *, struct rpc_msg *); diff --git a/sys/rpc/svc_generic.c b/sys/rpc/svc_generic.c index 522b413f12a0..1f9b2e2711d7 100644 --- a/sys/rpc/svc_generic.c +++ b/sys/rpc/svc_generic.c @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "rpc_com.h" +#include extern int __svc_vc_setflag(SVCXPRT *, int); diff --git a/sys/rpc/svc_vc.c b/sys/rpc/svc_vc.c index cada25299992..54edfd0c9455 100644 --- a/sys/rpc/svc_vc.c +++ b/sys/rpc/svc_vc.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include -#include "rpc_com.h" +#include static bool_t svc_vc_rendezvous_recv(SVCXPRT *, struct rpc_msg *); static enum xprt_stat svc_vc_rendezvous_stat(SVCXPRT *);