From a11d0027ce6b2c864c0c27d4b3ac68acb02d6fa3 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 12 Jun 2020 09:22:58 -0700 Subject: [PATCH] cast to uintptr_t instead should fix non 64-bit platforms --- pkg/zerotier/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zerotier/node.go b/pkg/zerotier/node.go index d5d4349dd..efba05860 100644 --- a/pkg/zerotier/node.go +++ b/pkg/zerotier/node.go @@ -883,7 +883,7 @@ func goStateObjectGetFunc(gn unsafe.Pointer, objType C.int, id, dataP unsafe.Poi *((*uintptr)(dataP)) = 0 tmp, found := node.stateObjectGet(int(objType), *((*[2]uint64)(id))) 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 { return -1 }