From b646f4d14c627d9a4300d9d015fb8e9b5cb2abef Mon Sep 17 00:00:00 2001 From: santouits Date: Mon, 6 Jul 2020 03:51:57 +0300 Subject: [PATCH] GCC-10 multiple definition progname My gcc-10 doesn't like that the draw.h defines progname and then includes it in two .c files. So we define it only in dmenu.c --- dmenu.c | 1 + draw.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dmenu.c b/dmenu.c index 768fb55..cf1d2f6 100644 --- a/dmenu.c +++ b/dmenu.c @@ -40,6 +40,7 @@ struct { int32_t scroll_right; } window_config; +const char *progname; static uint32_t color_bg = 0x222222ff; static uint32_t color_fg = 0xbbbbbbff; diff --git a/draw.h b/draw.h index d5d80ca..4cafaea 100644 --- a/draw.h +++ b/draw.h @@ -103,4 +103,4 @@ void eprintf(const char *fmt, ...); void weprintf(const char *fmt, ...); int32_t round_to_int(double val); -const char *progname; +extern const char *progname;