libplugin: fix compilation issue on recent gccs.

They now use -fno-common by default, so duplicated variables cause
a link error:

/usr/bin/ld: common/utils.o:(.bss+0x10): multiple definition of `chainparams'; plugins/libplugin.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:408: plugins/autoclean] Error 1

This was introduced in 9ebfdf0b8c.

Fixes: #3597
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Multiple definition of chainparams on Fedora (or other really recent gcc)
This commit is contained in:
Rusty Russell 2020-04-08 09:15:50 +09:30 committed by neil saitug
parent 11c21f97a6
commit 72327f5cc2

View file

@ -20,8 +20,6 @@
#define READ_CHUNKSIZE 4096
const struct chainparams *chainparams;
bool deprecated_apis;
struct plugin_timer {