diff options
author | mi <mi@FreeBSD.org> | 2015-01-23 06:08:58 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2015-01-23 06:08:58 +0800 |
commit | 89de35d58f45faa54f2b2d5d9ca7c61feb5c3a15 (patch) | |
tree | 97b6b6c5de25661b517fa56b1ce10e628e07a5af /net | |
parent | 89983114413f345417b2ee06dc7d8ffaff841366 (diff) | |
download | freebsd-ports-gnome-89de35d58f45faa54f2b2d5d9ca7c61feb5c3a15.tar.gz freebsd-ports-gnome-89de35d58f45faa54f2b2d5d9ca7c61feb5c3a15.tar.zst freebsd-ports-gnome-89de35d58f45faa54f2b2d5d9ca7c61feb5c3a15.zip |
Add a patch to fix 64-bit specific warnings in the just-added utilities.
PR: 197009
Submitted by: Jan Beich
Diffstat (limited to 'net')
-rw-r--r-- | net/libutp/files/patch-size_t | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/net/libutp/files/patch-size_t b/net/libutp/files/patch-size_t new file mode 100644 index 000000000000..ef1ed62db97c --- /dev/null +++ b/net/libutp/files/patch-size_t @@ -0,0 +1,54 @@ +--- utp_file/utp_recv.cpp 2013-05-14 19:05:36.000000000 -0400 ++++ utp_file/utp_recv.cpp 2015-01-22 16:45:03.000000000 -0500 +@@ -82,5 +82,5 @@ + UTPSocket *utp_socket = NULL; + FILE *file = NULL; +-size_t total_recv = 0; ++intmax_t total_recv = 0; + bool no_connection = true; + +@@ -205,5 +205,5 @@ + { + assert(utp_socket == socket); +- printf("utp on_write %u\n", count); ++ printf("utp on_write %zu\n", count); + assert(false); + } +@@ -365,10 +365,10 @@ + last_recv = total_recv; + last_time = cur_time; +- printf("\r[%u] recv: %d %.1f bytes/s ", cur_time, total_recv, rate); ++ printf("\r[%u] recv: %jd %.1f bytes/s ", cur_time, total_recv, rate); + fflush(stdout); + } + } + +- printf("\nreceived: %d bytes\n", total_recv); ++ printf("\nreceived: %jd bytes\n", (intmax_t)total_recv); + fclose(file); + fclose(log_file); +--- utp_file/utp_send.cpp 2013-05-14 19:05:36.000000000 -0400 ++++ utp_file/utp_send.cpp 2015-01-22 16:45:03.000000000 -0500 +@@ -82,6 +82,6 @@ + UTPSocket *utp_socket = NULL; + FILE *file = NULL; +-size_t total_sent = 0; +-size_t file_size = 0; ++intmax_t total_sent = 0; ++intmax_t file_size = 0; + + void utp_log(char const* fmt, ...) +@@ -252,5 +252,5 @@ + { + assert(utp_socket == socket); +- printf("utp on_read %u\n", count); ++ printf("utp on_read %zu\n", count); + assert(false); + } +@@ -392,5 +392,5 @@ + last_sent = total_sent; + last_time = cur_time; +- printf("\r[%u] sent: %d/%d %.1f bytes/s ", cur_time, total_sent, file_size, rate); ++ printf("\r[%u] sent: %jd/%jd %.1f bytes/s ", cur_time, total_sent, file_size, rate); + fflush(stdout); + } |