From abd5c00716a43ecc9cd3b9ee2b7640869f54e757 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 27 Mar 2022 11:19:42 +0300 Subject: [PATCH] horst: fix compilation with ncurses 6.3 Signed-off-by: Rosen Penev (cherry picked from commit 2bf3d9a7777b5e29663c0ce18c7f3e26e5352933) --- net/horst/Makefile | 2 +- net/horst/patches/010-ncurses63.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 net/horst/patches/010-ncurses63.patch diff --git a/net/horst/Makefile b/net/horst/Makefile index a9dfc17a9..80d45092d 100644 --- a/net/horst/Makefile +++ b/net/horst/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=horst PKG_VERSION:=5.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/br101/horst/archive/v$(PKG_VERSION)/ diff --git a/net/horst/patches/010-ncurses63.patch b/net/horst/patches/010-ncurses63.patch new file mode 100644 index 000000000..3b6cebb7b --- /dev/null +++ b/net/horst/patches/010-ncurses63.patch @@ -0,0 +1,22 @@ +--- a/display-main.c ++++ b/display-main.c +@@ -53,7 +53,7 @@ static struct ewma bpsn_avg; + void print_dump_win(const char *str, int refresh) + { + wattron(dump_win, RED); +- wprintw(dump_win, str); ++ wprintw(dump_win, "%s", str); + wattroff(dump_win, RED); + if (refresh) + wrefresh(dump_win); +--- a/display.c ++++ b/display.c +@@ -86,7 +86,7 @@ print_centered(WINDOW* win, int line, in + vsnprintf(buf, cols, fmt, ap); + va_end(ap); + +- mvwprintw(win, line, cols / 2 - strlen(buf) / 2, buf); ++ mvwprintw(win, line, cols / 2 - strlen(buf) / 2, "%s", buf); + free(buf); + } +