From a8b01e1c996a90cae7f4801ed7206a5913bf1021 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 20 Mar 2019 09:01:20 +0100 Subject: [PATCH] src/output: Unconst-cast tputs Fixes the build on Solaris/OpenIndiana/Illumos. --- src/output.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output.cpp b/src/output.cpp index ddabac3b4..64db9fba8 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -357,7 +357,9 @@ int outputter_t::term_puts(const char *str, int affcnt) { // scoped_push will restore it. scoped_lock locker{s_tputs_receiver_lock}; scoped_push push(&s_tputs_receiver, this); - return tputs(str, affcnt, tputs_writer); + // On some systems, tputs takes a char*, on others a const char*. + // Like tparm, we just cast it to unconst, that should work everywhere. + return tputs((char *)str, affcnt, tputs_writer); } /// Write a wide character to the outputter. This should only be used when writing characters from