diff options
Diffstat (limited to 'lib/libkvm')
-rw-r--r-- | lib/libkvm/kvm_amd64.c | 1 | ||||
-rw-r--r-- | lib/libkvm/kvm_file.c | 2 | ||||
-rw-r--r-- | lib/libkvm/kvm_getloadavg.c | 1 | ||||
-rw-r--r-- | lib/libkvm/kvm_i386.c | 1 | ||||
-rw-r--r-- | lib/libkvm/kvm_proc.c | 10 |
5 files changed, 11 insertions, 4 deletions
diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c index 764a2d1..efb4a53 100644 --- a/lib/libkvm/kvm_amd64.c +++ b/lib/libkvm/kvm_amd64.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; #include <sys/user.h> #include <sys/proc.h> #include <sys/stat.h> +#include <stdlib.h> #include <unistd.h> #include <nlist.h> #include <kvm.h> diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c index 4cd3615..c4cede3 100644 --- a/lib/libkvm/kvm_file.c +++ b/lib/libkvm/kvm_file.c @@ -71,7 +71,7 @@ static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93"; /* * Get file structures. */ -static +static int kvm_deadfiles(kd, op, arg, filehead_o, nfiles) kvm_t *kd; int op, arg, nfiles; diff --git a/lib/libkvm/kvm_getloadavg.c b/lib/libkvm/kvm_getloadavg.c index e13ee1d..3368e63 100644 --- a/lib/libkvm/kvm_getloadavg.c +++ b/lib/libkvm/kvm_getloadavg.c @@ -42,6 +42,7 @@ static char sccsid[] = "@(#)kvm_getloadavg.c 8.1 (Berkeley) 6/4/93"; #include <sys/sysctl.h> #include <vm/vm_param.h> +#include <stdlib.h> #include <db.h> #include <fcntl.h> #include <limits.h> diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c index 764a2d1..efb4a53 100644 --- a/lib/libkvm/kvm_i386.c +++ b/lib/libkvm/kvm_i386.c @@ -48,6 +48,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; #include <sys/user.h> #include <sys/proc.h> #include <sys/stat.h> +#include <stdlib.h> #include <unistd.h> #include <nlist.h> #include <kvm.h> diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index bb352d3..6a0df4a 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -54,6 +54,8 @@ static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93"; #include <sys/ioctl.h> #include <sys/tty.h> #include <sys/file.h> +#include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <nlist.h> #include <kvm.h> @@ -71,6 +73,7 @@ static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93"; #include "kvm_private.h" +#if used static char * kvm_readswap(kd, p, va, cnt) kvm_t *kd; @@ -84,6 +87,7 @@ kvm_readswap(kd, p, va, cnt) return(0); #endif /* __FreeBSD__ */ } +#endif #define KREAD(kd, addr, obj) \ (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj)) @@ -113,8 +117,8 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt) return (-1); } if (KREAD(kd, (u_long)proc.p_cred, &eproc.e_pcred) == 0) - KREAD(kd, (u_long)eproc.e_pcred.pc_ucred, - &eproc.e_ucred); + (void)(KREAD(kd, (u_long)eproc.e_pcred.pc_ucred, + &eproc.e_ucred)); switch(what) { @@ -659,7 +663,7 @@ kvm_getenvv(kd, kp, nchr) ssize_t kvm_uread(kd, p, uva, buf, len) kvm_t *kd; - register struct proc *p; + register const struct proc *p; register u_long uva; register char *buf; register size_t len; |