libdockapp: fix multiple definitions of global variable.
commit3491ec7d5d7dd6364eff1b000ddfa41e6689a514
authorJeremy Sowden <jeremy@azazel.net>
Sun, 3 May 2020 12:14:54 +0000 (3 13:14 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 3 May 2020 12:33:25 +0000 (3 13:33 +0100)
treeec150f18e3817865555960c0b5ceacf57ba01f98
parent1976f2deb02d59e2036986fc1abd23e35cec40f9
libdockapp: fix multiple definitions of global variable.

The `display` variable is declared in wmgeneral.h with no explicit
linkage.  This may result in there being definitions of it in the
library and the object-files of applications which link against it,
which causes link failures when building these applications with GCC 10,
since this uses -fno-common by default.

Add `extern` to the header declaration and a separate declaration with
no linkage in wmgeneral.c where it is initialized.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
libdockapp/src/wmgeneral.c
libdockapp/src/wmgeneral.h