From 342325db8e1d3ed8053185d9eeb8280fffc6dce2 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Fri, 17 Apr 2020 12:48:48 -0400 Subject: [PATCH] wmifinfo: Use extern when declaring global variables in header file. Avoids a FTBFS when compiling with -fno-common, which will be default in GCC 10. --- wmifinfo/xutils.c | 6 ++++++ wmifinfo/xutils.h | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/wmifinfo/xutils.c b/wmifinfo/xutils.c index 92050fd..ed40202 100644 --- a/wmifinfo/xutils.c +++ b/wmifinfo/xutils.c @@ -41,6 +41,12 @@ #include "xutils.h" +Display *display; +Window Root; +Window iconwin, win; +int screen; +int DisplayDepth; + /* * X11 Variables diff --git a/wmifinfo/xutils.h b/wmifinfo/xutils.h index fcd25f6..cf1ef5e 100644 --- a/wmifinfo/xutils.h +++ b/wmifinfo/xutils.h @@ -18,11 +18,11 @@ typedef struct { /* * Global variable */ -Display *display; -Window Root; -Window iconwin, win; -int screen; -int DisplayDepth; +extern Display *display; +extern Window Root; +extern Window iconwin, win; +extern int screen; +extern int DisplayDepth;