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:
Jeremy Sowden 2020-04-17 17:34:03 +01:00 committed by Carlos R. Mafra
parent 51132ae7ee
commit a09edcda9e
2 changed files with 2 additions and 1 deletions

View file

@ -65,6 +65,7 @@
/* X11 Variables */
/*****************/
Display *display;
Window Root;
int screen;
int x_fd;

View file

@ -36,7 +36,7 @@ typedef struct {
/* Global variable */
/*******************/
Display *display;
extern Display *display;
/***********************/
/* Function Prototypes */