diff options
Diffstat (limited to 'gdb/ui-style.c')
-rw-r--r-- | gdb/ui-style.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ui-style.c b/gdb/ui-style.c index 9a58e4d..d450c3e 100644 --- a/gdb/ui-style.c +++ b/gdb/ui-style.c @@ -594,7 +594,11 @@ colorsupport () { std::vector<color_space> result = {color_space::MONOCHROME}; - int colors = tgetnum ("Co"); + /* ncurses versions prior to 6.1 (and other curses + implementations) declare the tgetnum argument to be + 'char *', so we need the const_cast, since C++ will not + implicitly convert. */ + int colors = tgetnum (const_cast<char*> ("Co")); if (colors >= 8) result.push_back (color_space::ANSI_8COLOR); if (colors >= 16) |