mirror of
https://github.com/znc/znc.git
synced 2026-05-10 07:14:43 +02:00
Fix an ODR violation
Building with CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" CXXFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" LDFLAGS=-flto fails due to a violation of the one definition rule. There are two different definitions of TOption that are both linked into the znc binary. Fix this by putting them into anonymous namespaces. Fixes: https://github.com/znc/znc/issues/1834 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
@@ -363,11 +363,13 @@ CString CIRCNetwork::GetNetworkPath() const {
|
||||
return sNetworkPath;
|
||||
}
|
||||
|
||||
namespace {
|
||||
template <class T>
|
||||
struct TOption {
|
||||
const char* name;
|
||||
void (CIRCNetwork::*pSetter)(T);
|
||||
};
|
||||
}
|
||||
|
||||
bool CIRCNetwork::ParseConfig(CConfig* pConfig, CString& sError,
|
||||
bool bUpgrade) {
|
||||
|
||||
Reference in New Issue
Block a user