From a50564584f51599205f59e476a41c34a5bcee390 Mon Sep 17 00:00:00 2001 From: fooxax Date: Sun, 13 Dec 2020 14:54:13 +0100 Subject: Avoid duplicate definition of global default variables With GCC 10 several things got changed. One of the things is the -fno-common default which prevented the code to link cause of multiple definition issues. Declared the variables extern and defined them in c-file to avoid the linker error. Details can be found here: https://gcc.gnu.org/gcc-10/porting_to.html --- defaults.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'defaults.c') diff --git a/defaults.c b/defaults.c index 1f6e8ec..cebf332 100644 --- a/defaults.c +++ b/defaults.c @@ -3,6 +3,14 @@ #include #include +char* DEFAULT_GOV; +char* DEFAULT_FREQ; +char* DEFAULT_PROG; +char* DEFAULT_BAT_GOV; +char* DEFAULT_AC_GOV; +bool DEFAULT_SHOW_BATTERY; +char DEFAULT_THEME[1024]; + void defaults_init() { DEFAULT_GOV = NULL; -- cgit v1.1