2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

GCC 5.X: Force disable macro _GLIBCXX_USE_CXX11_ABI for compatibility oldest version libstdc++

Fix #476
This commit is contained in:
s1lent 2017-06-28 18:26:29 +07:00
parent ba2d9e2cc0
commit eac20aef3a
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
2 changed files with 12 additions and 5 deletions

View File

@ -1301,11 +1301,10 @@ unsigned int Proxy::GetChallengeNumber(NetAddress *host)
int i; int i;
int oldest = 0; int oldest = 0;
float oldestTime = 9.9999997e37f; float oldestTime = 9.9999997e37f;
const float challengeLife = 40.0f;
for (i = 0; i < MAX_CHALLENGES; i++) for (i = 0; i < MAX_CHALLENGES; i++)
{ {
if (m_Challenges[i].adr.Equal(host)) { if (m_Challenges[i].adr.EqualBase(host)) {
break; break;
} }
@ -1343,7 +1342,7 @@ bool Proxy::CheckChallenge(NetAddress *from, unsigned int challengeNumber)
{ {
if (from->EqualBase(&it.adr)) { if (from->EqualBase(&it.adr)) {
if (it.challenge == challengeNumber) { if (it.challenge == challengeNumber) {
return (m_SystemTime - it.time <= 40); return (m_SystemTime - it.time <= PROXY_CHALLENGE_LIFE);
} }
break; break;

View File

@ -16,7 +16,11 @@ rootProject.ext.createIccConfig = { boolean release, BinaryKind binKind ->
intelExtensions: false, intelExtensions: false,
asmBlocks: true, asmBlocks: true,
positionIndependentCode: false positionIndependentCode: false,
extraDefines: [
'_GLIBCXX_USE_CXX11_ABI': 0,
]
), ),
linkerOptions: new GccToolchainConfig.LinkerOptions( linkerOptions: new GccToolchainConfig.LinkerOptions(
@ -41,7 +45,11 @@ rootProject.ext.createIccConfig = { boolean release, BinaryKind binKind ->
noBuiltIn: true, noBuiltIn: true,
intelExtensions: false, intelExtensions: false,
asmBlocks: true asmBlocks: true,
extraDefines: [
'_GLIBCXX_USE_CXX11_ABI': 0,
]
), ),
linkerOptions: new GccToolchainConfig.LinkerOptions( linkerOptions: new GccToolchainConfig.LinkerOptions(