Fix some WARNS6 regression that crept up in the last days.
authorSascha Wildner <saw@online.de>
Tue, 30 Dec 2008 15:35:10 +0000 (16:35 +0100)
committerSascha Wildner <saw@online.de>
Tue, 30 Dec 2008 15:35:27 +0000 (16:35 +0100)
bin/ps/print.c
bin/rm/rm.c
contrib/smbfs/smbutil/dumptree.c
libexec/rpc.rquotad/rquotad.c
usr.bin/lastcomm/lastcomm.c
usr.bin/systat/pigs.c

index 71510bd..d5e582c 100644 (file)
@@ -51,6 +51,7 @@
 #include <locale.h>
 #include <math.h>
 #include <nlist.h>
+#include <pwd.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
index 514b3f1..47529b5 100644 (file)
@@ -45,6 +45,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <fts.h>
+#include <grp.h>
+#include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
index 7d06142..2ae3833 100644 (file)
@@ -1,5 +1,7 @@
 #include <sys/param.h>
 #include <sys/time.h>
+#include <grp.h>
+#include <pwd.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
index a450a66..e7f6d05 100644 (file)
@@ -112,7 +112,7 @@ rquota_service(struct svc_req *request, SVCXPRT *transp)
 {
        switch (request->rq_proc) {
        case NULLPROC:
-               (void)svc_sendreply(transp, xdr_void, (char *)NULL);
+               (void)svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL);
                break;
 
        case RQUOTAPROC_GETQUOTA:
@@ -138,7 +138,7 @@ sendquota(struct svc_req *request, SVCXPRT *transp)
        struct timeval timev;
 
        bzero((char *)&getq_args, sizeof(getq_args));
-       if (!svc_getargs(transp, xdr_getquota_args, (caddr_t)&getq_args)) {
+       if (!svc_getargs(transp, (xdrproc_t)xdr_getquota_args, (caddr_t)&getq_args)) {
                svcerr_decode(transp);
                return;
        }
@@ -170,10 +170,10 @@ sendquota(struct svc_req *request, SVCXPRT *transp)
                getq_rslt.getquota_rslt_u.gqr_rquota.rq_ftimeleft =
                    dqblk.dqb_itime - timev.tv_sec;
        }
-       if (!svc_sendreply(transp, xdr_getquota_rslt, (char *)&getq_rslt)) {
+       if (!svc_sendreply(transp, (xdrproc_t)xdr_getquota_rslt, (char *)&getq_rslt)) {
                svcerr_systemerr(transp);
        }
-       if (!svc_freeargs(transp, xdr_getquota_args, (caddr_t)&getq_args)) {
+       if (!svc_freeargs(transp, (xdrproc_t)xdr_getquota_args, (caddr_t)&getq_args)) {
                syslog(LOG_ERR, "unable to free arguments");
                exit(1);
        }
index 4ca00db..a5e83e9 100644 (file)
@@ -43,6 +43,7 @@
 #include <ctype.h>
 #include <err.h>
 #include <fcntl.h>
+#include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index e8e38f3..1ac9fca 100644 (file)
@@ -124,7 +124,7 @@ showpigs(void)
                        uname = "";
                        pname = "<idle>";
                } else {
-                       uname = (char *)user_from_uid(pt[k].pt_kp->kp_uid, 0);
+                       uname = user_from_uid(pt[k].pt_kp->kp_uid, 0);
                        pname = pt[k].pt_kp->kp_comm;
                }
                wmove(wnd, y, 0);