From 051657feed1b819499664d53891833ae1f56a7da Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Tue, 28 Aug 2018 21:23:03 +0200 Subject: [PATCH] libbareos: solve the undefined reference by a weak attribute - this is probably not protable - GetTlsResourceByFullyQualifiedResourceName is not known when linking libbareos --- core/src/lib/parse_conf.h | 2 +- core/src/lib/tls_openssl_private.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/lib/parse_conf.h b/core/src/lib/parse_conf.h index b4c97730936..9ed81b28a53 100644 --- a/core/src/lib/parse_conf.h +++ b/core/src/lib/parse_conf.h @@ -500,7 +500,7 @@ DLL_IMP_EXP void InitResource(int type, ResourceItem *item); DLL_IMP_EXP bool SaveResource(int type, ResourceItem *item, int pass); DLL_IMP_EXP bool StoreResource(int type, LEX *lc, ResourceItem *item, int index, int pass); DLL_IMP_EXP const char *res_to_str(int rcode); -DLL_IMP_EXP bool GetTlsResourceByFullyQualifiedResourceName(const char *fq_name_, std::string &psk_return_value); +DLL_IMP_EXP bool GetTlsResourceByFullyQualifiedResourceName(const char *fq_name_, std::string &psk_return_value) __attribute__((weak)); #ifdef HAVE_JANSSON diff --git a/core/src/lib/tls_openssl_private.cc b/core/src/lib/tls_openssl_private.cc index ee9594446f6..72df931492d 100644 --- a/core/src/lib/tls_openssl_private.cc +++ b/core/src/lib/tls_openssl_private.cc @@ -26,7 +26,7 @@ #include "lib/bpoll.h" #include "lib/crypto_openssl.h" -#include "parse_conf.h" +#include "lib/parse_conf.h" #include #include