git: 6e99116af05f - main - net/liboping: Fix build

From: Brad Davis <brd_at_FreeBSD.org>
Date: Mon, 12 Aug 2024 16:24:17 UTC
The branch main has been updated by brd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6e99116af05f23b37bb184effe49341b3b398539

commit 6e99116af05f23b37bb184effe49341b3b398539
Author:     Brad Davis <brd@FreeBSD.org>
AuthorDate: 2024-08-12 16:22:18 +0000
Commit:     Brad Davis <brd@FreeBSD.org>
CommitDate: 2024-08-12 16:22:18 +0000

    net/liboping: Fix build
    
    Pulled from https://github.com/octo/liboping/pull/61
    
    PR:             280780
    Approved by:    garga
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 net/liboping/Makefile                |  1 +
 net/liboping/files/patch-src_oping.c | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/net/liboping/Makefile b/net/liboping/Makefile
index f80846cfa7ed..9a76a24bc2c9 100644
--- a/net/liboping/Makefile
+++ b/net/liboping/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	liboping
 DISTVERSION=	1.10.0
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	https://noping.cc/files/
 
diff --git a/net/liboping/files/patch-src_oping.c b/net/liboping/files/patch-src_oping.c
new file mode 100644
index 000000000000..29abecfc0daa
--- /dev/null
+++ b/net/liboping/files/patch-src_oping.c
@@ -0,0 +1,30 @@
+--- src/oping.c.orig	2017-05-11 07:32:27 UTC
++++ src/oping.c
+@@ -1125,7 +1125,7 @@ static int update_graph_prettyping (ping_context_t *ct
+ 			wattron (ctx->window, COLOR_PAIR(color));
+ 
+ 		if (has_utf8())
+-			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol);
++			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol);
+ 		else
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc);
+ 
+@@ -1223,7 +1223,7 @@ static int update_graph_histogram (ping_context_t *ctx
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' ');
+ 		else if (has_utf8 ())
+ 			mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2,
+-					hist_symbols_utf8[index]);
++					"%s", hist_symbols_utf8[index]);
+ 		else
+ 			mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2,
+ 					hist_symbols_acs[index] | A_ALTCHARSET);
+@@ -1600,8 +1600,7 @@ static void update_host_hook (pingobj_iter_t *iter, /*
+ 
+ 			HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
+ 					data_len, context->host, context->addr,
+-					sequence, recv_ttl,
+-					format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
++					sequence, recv_ttl);
+ 			if ((recv_qos != 0) || (opt_send_qos != 0))
+ 			{
+ 				HOST_PRINTF ("qos=%s ",