src/output: Unconst-cast tputs

Fixes the build on Solaris/OpenIndiana/Illumos.
This commit is contained in:
Fabian Homborg
2019-03-20 09:01:20 +01:00
parent 1a53bbeb9d
commit a8b01e1c99

View File

@@ -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<outputter_t *> 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