From: Tom de Vries Date: Thu, 22 Jan 2026 13:12:15 +0000 (+0100) Subject: [gdb/build] Declare gdb_get_ncolors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93172549b7397c526b3622e16484909028d81e41;p=thirdparty%2Fbinutils-gdb.git [gdb/build] Declare gdb_get_ncolors Since a recent commit, I run into: .... gdb/ui-style.c: In lambda function: gdb/ui-style.c:597:20: error: ‘gdb_get_ncolors’ was not declared in this scope 597 | int colors = gdb_get_ncolors (); | ^~~~~~~~~~~~~~~ make: *** [Makefile:2096: ui-style.o] Error 1 .... Fix this by adding the missing declaration. --- diff --git a/gdb/ui-style.h b/gdb/ui-style.h index 823bf6b62f8..fca9150889b 100644 --- a/gdb/ui-style.h +++ b/gdb/ui-style.h @@ -51,6 +51,9 @@ extern const char * color_space_name (color_space c); /* Cast C to RESULT and return true if it's value is valid; false otherwise. */ extern bool color_space_safe_cast (color_space *result, long c); +/* Get the number of colors supported by the terminal where GDB is running. */ +extern int gdb_get_ncolors (); + /* Styles that can be applied to a ui_file. */ struct ui_file_style {