wmmoonclock: fix multiple definitions of some global variables.
A number of variables are declared in a header with no explicit linkage. This results in there being definitions of them in multiple object files, which causes a link failure with GCC 10, since this uses -fno-common by default. Add `extern` to the header declarations and separate declarations with no linkage in xutils.c where they are assigned. Link: https://bugs.debian.org/957950 Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
This commit is contained in:
parent
f3c5aa1780
commit
19f9137056
|
@ -40,6 +40,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global variable
|
||||||
|
*/
|
||||||
|
Display *display;
|
||||||
|
Window Root;
|
||||||
|
Window iconwin, win;
|
||||||
|
int screen;
|
||||||
|
int DisplayDepth;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* X11 Variables
|
* X11 Variables
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,11 +20,11 @@ typedef struct {
|
||||||
/*
|
/*
|
||||||
* Global variable
|
* Global variable
|
||||||
*/
|
*/
|
||||||
Display *display;
|
extern Display *display;
|
||||||
Window Root;
|
extern Window Root;
|
||||||
Window iconwin, win;
|
extern Window iconwin, win;
|
||||||
int screen;
|
extern int screen;
|
||||||
int DisplayDepth;
|
extern int DisplayDepth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue