cast time_t to long long (time_t is signed)
tv_nsec is long

---
 sys/dev/vmt.c                     |    4 ++--
 sys/miscfs/procfs/procfs_status.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git sys/dev/vmt.c sys/dev/vmt.c
index 5fb5e1e..34f1aec 100644
--- sys/dev/vmt.c
+++ sys/dev/vmt.c
@@ -313,8 +313,8 @@ void
 vmt_update_guest_uptime(struct vmt_softc *sc)
 {
        /* host wants uptime in hundredths of a second */
-       if (vm_rpc_send_rpci_tx(sc, "SetGuestInfo  %d %lu00",
-           VM_GUEST_INFO_UPTIME, time_uptime) != 0) {
+       if (vm_rpc_send_rpci_tx(sc, "SetGuestInfo  %d %lld00",
+           VM_GUEST_INFO_UPTIME, (long long)time_uptime) != 0) {
                printf("%s: unable to set guest uptime", DEVNAME(sc));
                sc->sc_rpc_error = 1;
        }
diff --git sys/miscfs/procfs/procfs_status.c sys/miscfs/procfs/procfs_status.c
index 89cec59..8857509 100644
--- sys/miscfs/procfs/procfs_status.c
+++ sys/miscfs/procfs/procfs_status.c
@@ -117,8 +117,8 @@ procfs_stat_gen(struct proc *p, char *s, int l)
                COUNTORCAT(s, l, ps, n);
        }
 
-       snprintf(ps, sizeof(ps), " %ld,%ld",
-           pr->ps_start.tv_sec, pr->ps_start.tv_nsec/1000);
+       snprintf(ps, sizeof(ps), " %lld,%ld",
+           (long long)pr->ps_start.tv_sec, pr->ps_start.tv_nsec/1000);
        COUNTORCAT(s, l, ps, n);
 
        calcru(&pr->ps_tu, &ut, &st, (void *) 0);
-- 
1.7.6


Reply via email to