1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 03:09:51 +03:00
aports/testing/dmenu-wl/0001-GCC-10-multiple-definition-progname.patch
2025-07-02 12:32:09 +02:00

37 lines
972 B
Diff

From b646f4d14c627d9a4300d9d015fb8e9b5cb2abef Mon Sep 17 00:00:00 2001
From: santouits <santouits@users.noreply.github.com>
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;
--
2.48.1