mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-19 21:03:57 -07:00
GCC/G++ build fixes, GitHub issue #563
This commit is contained in:
parent
ee1dc16e8f
commit
a4bc40542b
3 changed files with 5 additions and 5 deletions
|
@ -50,7 +50,7 @@ public:
|
|||
inline int load() const
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
return __sync_or_and_fetch(&_v,0);
|
||||
return __sync_or_and_fetch(const_cast<int *>(&_v),0);
|
||||
#else
|
||||
return _v.load();
|
||||
#endif
|
||||
|
|
|
@ -100,7 +100,7 @@ Node::Node(void *uptr,void *tptr,const struct ZT_Node_Callbacks *callbacks,uint6
|
|||
} else {
|
||||
idtmp[0] = RR->identity.address().toInt(); idtmp[1] = 0;
|
||||
n = stateObjectGet(tptr,ZT_STATE_OBJECT_IDENTITY_PUBLIC,idtmp,tmp,sizeof(tmp) - 1);
|
||||
if ((n > 0)&&(n < sizeof(RR->publicIdentityStr))&&(n < sizeof(tmp))) {
|
||||
if ((n > 0)&&(n < (int)sizeof(RR->publicIdentityStr))&&(n < (int)sizeof(tmp))) {
|
||||
if (memcmp(tmp,RR->publicIdentityStr,n))
|
||||
stateObjectPut(tptr,ZT_STATE_OBJECT_IDENTITY_PUBLIC,idtmp,RR->publicIdentityStr,(unsigned int)strlen(RR->publicIdentityStr));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue