From 9ce6ffbb87cbe68af62e356369dfd776b7c4a0e5 Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Mon, 28 Nov 2022 19:23:23 +0000 Subject: [PATCH] wl: declare desktop/monitor info functions as weak symbols these are implemented on both Wayland and X11, as stubs on the former. we need to properly dispatch these based on the backend, but for now this resolves the conflict --- src/wl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wl.cc b/src/wl.cc index 0cd61d90..1f4c5615 100644 --- a/src/wl.cc +++ b/src/wl.cc @@ -63,7 +63,7 @@ priv::out_to_wayland_setting out_to_wayland; static const char NOT_IN_WAYLAND[] = "Not running in Wayland"; -void print_monitor(struct text_object *obj, char *p, unsigned int p_max_size) { +__attribute__((weak)) void print_monitor(struct text_object *obj, char *p, unsigned int p_max_size) { (void)obj; if (!out_to_wayland.get(*state)) { @@ -73,7 +73,7 @@ void print_monitor(struct text_object *obj, char *p, unsigned int p_max_size) { snprintf(p, p_max_size, "%d", -1); } -void print_monitor_number(struct text_object *obj, char *p, +__attribute__((weak)) void print_monitor_number(struct text_object *obj, char *p, unsigned int p_max_size) { (void)obj; @@ -84,7 +84,7 @@ void print_monitor_number(struct text_object *obj, char *p, snprintf(p, p_max_size, "%d", -1); } -void print_desktop(struct text_object *obj, char *p, unsigned int p_max_size) { +__attribute__((weak)) void print_desktop(struct text_object *obj, char *p, unsigned int p_max_size) { (void)obj; if (!out_to_wayland.get(*state)) { @@ -94,7 +94,7 @@ void print_desktop(struct text_object *obj, char *p, unsigned int p_max_size) { snprintf(p, p_max_size, "%d", -1); } -void print_desktop_number(struct text_object *obj, char *p, +__attribute__((weak)) void print_desktop_number(struct text_object *obj, char *p, unsigned int p_max_size) { (void)obj; @@ -105,7 +105,7 @@ void print_desktop_number(struct text_object *obj, char *p, snprintf(p, p_max_size, "%d", -1); } -void print_desktop_name(struct text_object *obj, char *p, +__attribute__((weak)) void print_desktop_name(struct text_object *obj, char *p, unsigned int p_max_size) { (void)obj;