mirror of
https://github.com/Cloudef/bemenu
synced 2025-02-19 08:16:49 +00:00
Mark global wayland constant extern
Without `extern`, the changed lines are not declarations, but "tentative definitions" (according to GCC man page, option `-fcommon`). When specified in a header file that is included in more than one `.c` file, these result in linking failure unless `-fcommon` is specified. GCC 10 changed the default from `-fcommon` to `-fno-common`, and as such the previous code no longer links properly. With `extern`, these lines are considered declarations, and the linking proceeds successfully.
This commit is contained in:
parent
7170c93f3a
commit
2f45c191bc
@ -33,8 +33,8 @@ enum mask {
|
||||
MASK_LAST
|
||||
};
|
||||
|
||||
const char *BM_XKB_MASK_NAMES[MASK_LAST];
|
||||
const enum mod_bit BM_XKB_MODS[MASK_LAST];
|
||||
extern const char *BM_XKB_MASK_NAMES[MASK_LAST];
|
||||
extern const enum mod_bit BM_XKB_MODS[MASK_LAST];
|
||||
|
||||
struct xkb {
|
||||
struct xkb_state *state;
|
||||
|
Loading…
Reference in New Issue
Block a user