summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/unistd.h1
-rw-r--r--usr.sbin/rpc.lockd/Makefile2
-rw-r--r--usr.sbin/rpc.lockd/lockd.c5
-rw-r--r--usr.sbin/rpc.lockd/lockd_lock.c3
4 files changed, 5 insertions, 6 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 34f187c..adbaa54 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -529,6 +529,7 @@ char *mktemp(char *);
#define _MKTEMP_DECLARED
#endif
int nfssvc(int, void *);
+int nlm_syscall(int, int, int, char **);
int profil(char *, size_t, vm_offset_t, int);
int rcmd(char **, int, const char *, const char *, const char *, int *);
int rcmd_af(char **, int, const char *,
diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile
index c81da82..e2185c8 100644
--- a/usr.sbin/rpc.lockd/Makefile
+++ b/usr.sbin/rpc.lockd/Makefile
@@ -7,7 +7,7 @@ MLINKS= rpc.lockd.8 lockd.8
SRCS= kern.c nlm_prot_svc.c lockd.c lock_proc.c lockd_lock.c
CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc
-WARNS?= 0
+WARNS?= 3
DPADD= ${LIBRPCSVC} ${LIBUTIL}
LDADD= -lrpcsvc -lutil
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c
index c111b58..fb9e536 100644
--- a/usr.sbin/rpc.lockd/lockd.c
+++ b/usr.sbin/rpc.lockd/lockd.c
@@ -88,6 +88,7 @@ int nhosts = 0;
int xcreated = 0;
char **addrs; /* actually (netid, uaddr) pairs */
int naddrs; /* count of how many (netid, uaddr) pairs */
+char localhost[] = "localhost";
void create_service(struct netconfig *nconf);
void lookup_addresses(struct netconfig *nconf);
@@ -626,11 +627,8 @@ lookup_addresses(struct netconfig *nconf)
struct sockaddr_in6 *sin6;
struct __rpc_sockinfo si;
struct netbuf servaddr;
- SVCXPRT *transp = NULL;
int aicode;
int nhostsbak;
- int r;
- int registered = 0;
u_int32_t host_addr[4]; /* IPv4 or IPv6 */
char *uaddr;
@@ -789,7 +787,6 @@ init_nsm(void)
my_id id;
sm_stat stat;
char name[] = "NFS NLM";
- char localhost[] = "localhost";
/*
* !!!
diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c
index 5d37c32..5900bfa 100644
--- a/usr.sbin/rpc.lockd/lockd_lock.c
+++ b/usr.sbin/rpc.lockd/lockd_lock.c
@@ -197,6 +197,7 @@ enum hwlock_status lock_hwlock(struct file_lock *fl);
enum split_status split_nfslock(const struct file_lock *exist_lock,
const struct file_lock *unlock_lock, struct file_lock **left_lock,
struct file_lock **right_lock);
+int duplicate_block(struct file_lock *fl);
void add_blockingfilelock(struct file_lock *fl);
enum hwlock_status unlock_hwlock(const struct file_lock *fl);
enum hwlock_status test_hwlock(const struct file_lock *fl,
@@ -1198,7 +1199,7 @@ test_hwlock(fl, conflicting_fl)
int
duplicate_block(struct file_lock *fl)
{
- struct file_lock *ifl,*nfl;
+ struct file_lock *ifl;
int retval = 0;
debuglog("Entering duplicate_block");
OpenPOWER on IntegriCloud