BUILD: 51d: fix build issue with recent compilers

With gcc-11.2 and binutils-2.37 I'm getting link errors due to multiply
defined symbols when enabling USE_51DEGREES_V4. This is caused by two
variables being present in hash.h instead of hash.c, hence they're
defined twice.

This patch just moves them to hash.c and turns their declaration to
extern.

No backport is needed since this was introduced in 2.8-dev.
This commit is contained in:
Willy Tarreau 2022-12-15 19:34:23 +01:00
parent 5ac6b3b125
commit 24f5a24c18
2 changed files with 5 additions and 2 deletions

View File

@ -36,6 +36,9 @@
static fiftyoneDegreesHeaders dummyHeaders = { };
static fiftyoneDegreesDataSetBase dummyDataSet = { &dummyHeaders };
fiftyoneDegreesConfigHash fiftyoneDegreesHashInMemoryConfig;
fiftyoneDegreesPropertiesRequired fiftyoneDegreesPropertiesDefault;
fiftyoneDegreesDataSetBase* fiftyoneDegreesDataSetGet(
fiftyoneDegreesResourceManager *manager) {
return &dummyDataSet;

View File

@ -189,7 +189,7 @@ typedef struct fiftyone_degrees_config_hash_t {
bool usePredictiveGraph;
} fiftyoneDegreesConfigHash;
fiftyoneDegreesConfigHash fiftyoneDegreesHashInMemoryConfig;
extern fiftyoneDegreesConfigHash fiftyoneDegreesHashInMemoryConfig;
typedef struct fiftyone_degrees_property_available_t {
@ -206,7 +206,7 @@ typedef struct fiftyone_degrees_properties_required_t {
fiftyoneDegreesPropertiesAvailable *existing;
} fiftyoneDegreesPropertiesRequired;
fiftyoneDegreesPropertiesRequired fiftyoneDegreesPropertiesDefault;
extern fiftyoneDegreesPropertiesRequired fiftyoneDegreesPropertiesDefault;
typedef struct fiftyone_degrees_memory_reader_t {
byte *startByte;