mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
cast to uintptr_t instead
should fix non 64-bit platforms
This commit is contained in:
parent
c9ae7e811f
commit
a11d0027ce
1 changed files with 1 additions and 1 deletions
|
@ -883,7 +883,7 @@ func goStateObjectGetFunc(gn unsafe.Pointer, objType C.int, id, dataP unsafe.Poi
|
||||||
*((*uintptr)(dataP)) = 0
|
*((*uintptr)(dataP)) = 0
|
||||||
tmp, found := node.stateObjectGet(int(objType), *((*[2]uint64)(id)))
|
tmp, found := node.stateObjectGet(int(objType), *((*[2]uint64)(id)))
|
||||||
if found && len(tmp) > 0 {
|
if found && len(tmp) > 0 {
|
||||||
cData := C.malloc(C.ulong(len(tmp))) // GoGlue sends free() to the core as the free function
|
cData := C.malloc(C.uintptr_t(len(tmp))) // GoGlue sends free() to the core as the free function
|
||||||
if uintptr(cData) == 0 {
|
if uintptr(cData) == 0 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue