Fix multiple definitions of display variable.
The display variable is declared in a header with no explicit linkage. This results in there being multiple definitions of it in wmbiff.o and libwmgeneral.a and a failure during linking with gcc 10. Add `extern` to the header declaration and a separate declaration with no linkage in wmgeneral.c where it is assigned. Link: https://bugs.debian.org/957937 Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
parent
51132ae7ee
commit
a09edcda9e
|
@ -65,6 +65,7 @@
|
||||||
/* X11 Variables */
|
/* X11 Variables */
|
||||||
/*****************/
|
/*****************/
|
||||||
|
|
||||||
|
Display *display;
|
||||||
Window Root;
|
Window Root;
|
||||||
int screen;
|
int screen;
|
||||||
int x_fd;
|
int x_fd;
|
||||||
|
|
|
@ -36,7 +36,7 @@ typedef struct {
|
||||||
/* Global variable */
|
/* Global variable */
|
||||||
/*******************/
|
/*******************/
|
||||||
|
|
||||||
Display *display;
|
extern Display *display;
|
||||||
|
|
||||||
/***********************/
|
/***********************/
|
||||||
/* Function Prototypes */
|
/* Function Prototypes */
|
||||||
|
|
Loading…
Reference in a new issue