Browse Source

Build fixes.

Adam Ierymenko 5 years ago
parent
commit
cef708c8ad

+ 0 - 4
go/native/GoGlue.h

@@ -47,10 +47,6 @@ void ZT_GoTap_deviceName(ZT_GoTap *tap,char nbuf[256]);
 void ZT_GoTap_setFriendlyName(ZT_GoTap *tap,const char *friendlyName);
 void ZT_GoTap_setFriendlyName(ZT_GoTap *tap,const char *friendlyName);
 void ZT_GoTap_setMtu(ZT_GoTap *tap,unsigned int mtu);
 void ZT_GoTap_setMtu(ZT_GoTap *tap,unsigned int mtu);
 
 
-int ZT_TestCrypto();
-int ZT_TestIdentity();
-int ZT_TestOther();
-
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif

+ 1 - 0
go/pkg/zerotier/address.go

@@ -41,6 +41,7 @@ func NewAddressFromBytes(b []byte) (Address, error) {
 
 
 // Copy this address to a byte array, which must be 5 bytes in length or this will panic.
 // Copy this address to a byte array, which must be 5 bytes in length or this will panic.
 func (a Address) CopyTo(b []byte) {
 func (a Address) CopyTo(b []byte) {
+	_ = b[4]
 	b[0] = byte(a >> 32)
 	b[0] = byte(a >> 32)
 	b[1] = byte(a >> 24)
 	b[1] = byte(a >> 24)
 	b[2] = byte(a >> 16)
 	b[2] = byte(a >> 16)

+ 1 - 1
go/pkg/zerotier/identity.go

@@ -13,7 +13,7 @@
 
 
 package zerotier
 package zerotier
 
 
-//#include "../../native/GoGlue.h"
+// #include "../../native/GoGlue.h"
 import "C"
 import "C"
 
 
 import (
 import (

+ 4 - 4
go/pkg/zerotier/node.go

@@ -13,10 +13,10 @@
 
 
 package zerotier
 package zerotier
 
 
-//#cgo CFLAGS: -O3
-//#cgo darwin LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lc++ -lpthread
-//#cgo linux android LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lstdc++ -lpthread -lm
-//#include "../../native/GoGlue.h"
+// #cgo CFLAGS: -O3
+// #cgo darwin LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lc++ -lpthread
+// #cgo linux android LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lstdc++ -lpthread -lm
+// #include "../../native/GoGlue.h"
 import "C"
 import "C"
 
 
 import (
 import (

+ 0 - 23
go/pkg/zerotier/selftest.go

@@ -1,23 +0,0 @@
-/*
- * Copyright (c)2013-2020 ZeroTier, Inc.
- *
- * Use of this software is governed by the Business Source License included
- * in the LICENSE.TXT file in the project's root directory.
- *
- * Change Date: 2024-01-01
- *
- * On the date above, in accordance with the Business Source License, use
- * of this software will be governed by version 2.0 of the Apache License.
- */
-/****/
-
-package zerotier
-
-//#include "../../native/GoGlue.h"
-import "C"
-
-// SelfTest runs a series of tests on the ZeroTier core and the Go service code, returning true on success.
-// Results are sent to stdout.
-func SelfTest() bool {
-	return true
-}

+ 1 - 1
node/Dictionary.cpp

@@ -129,7 +129,7 @@ void Dictionary::encode(Vector<uint8_t> &out) const
 	for(Map< uint64_t,Vector<uint8_t> >::const_iterator ti(m_entries.begin());ti != m_entries.end();++ti) {
 	for(Map< uint64_t,Vector<uint8_t> >::const_iterator ti(m_entries.begin());ti != m_entries.end();++ti) {
 		str[0] = ti->first;
 		str[0] = ti->first;
 		s_appendKey(out,reinterpret_cast<const char *>(str));
 		s_appendKey(out,reinterpret_cast<const char *>(str));
-		for(std::vector<uint8_t>::const_iterator i(ti->second.begin());i!=ti->second.end();++i)
+		for(Vector<uint8_t>::const_iterator i(ti->second.begin());i!=ti->second.end();++i)
 			s_appendValueByte(out,*i);
 			s_appendValueByte(out,*i);
 		out.push_back((uint8_t)'\n');
 		out.push_back((uint8_t)'\n');
 	}
 	}

+ 0 - 1
node/Topology.hpp

@@ -25,7 +25,6 @@
 #include "ScopedPtr.hpp"
 #include "ScopedPtr.hpp"
 #include "Fingerprint.hpp"
 #include "Fingerprint.hpp"
 #include "Containers.hpp"
 #include "Containers.hpp"
-#include "PeerList.hpp"
 
 
 namespace ZeroTier {
 namespace ZeroTier {