Annotation of elwix/patches/freebsd.netreceive.PR178862.patch, revision 1.1.2.1

1.1.2.1 ! misho       1: --- tools/tools/netrate/netreceive/netreceive.c.orig   2013-05-23 12:00:42.735844141 +0200
        !             2: +++ tools/tools/netrate/netreceive/netreceive.c        2013-05-23 15:11:05.507074899 +0200
        !             3: @@ -138,10 +138,10 @@
        !             4:                perror("no room for pointers!");
        !             5:                exit(1);
        !             6:        }
        !             7: -      tp = (struct td_desc **)m;
        !             8: +      tp = (struct td_desc **)(void *) m;
        !             9:        m += lb;        /* skip the pointers */
        !            10:        for (si = i = 0; i < nt; i++, m += td_len) {
        !            11: -              tp[i] = (struct td_desc *)m;
        !            12: +              tp[i] = (struct td_desc *)(void *) m;
        !            13:                tp[i]->fd = s[si];
        !            14:                tp[i]->buflen = 65536;
        !            15:                tp[i]->buf = calloc(1, tp[i]->buflen);
        !            16: @@ -163,7 +163,7 @@
        !            17:        /* now the parent collects and prints results */
        !            18:        c0 = c1 = bc0 = bc1 = 0;
        !            19:        clock_gettime(CLOCK_REALTIME, &then);
        !            20: -      fprintf(stderr, "start at %ld.%09ld\n", then.tv_sec, then.tv_nsec);
        !            21: +      fprintf(stderr, "start at %jd.%09ld\n", (__intmax_t)then.tv_sec, then.tv_nsec);
        !            22:        while (1) {
        !            23:                int i, nt = nsock * nthreads;
        !            24:                int64_t dn;
        !            25: @@ -185,8 +185,8 @@
        !            26:                pps = (pps * 1000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
        !            27:                bps = ((bc0 - bc1) * 8000000000) / (delta.tv_sec*1000000000 + delta.tv_nsec + 1);
        !            28:                fprintf(stderr, " %9ld pps %8.3f Mbps", (long)pps, .000001*bps);
        !            29: -              fprintf(stderr, " - %d pkts in %ld.%09ld ns\n",
        !            30: -                      (int)dn, delta.tv_sec, delta.tv_nsec);
        !            31: +              fprintf(stderr, " - %d pkts in %jd.%09ld ns\n",
        !            32: +                      (int)dn, (__intmax_t)delta.tv_sec, delta.tv_nsec);
        !            33:                c1 = c0;
        !            34:                bc1 = bc0;
        !            35:        }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>