Build fixes.

This commit is contained in:
Adam Ierymenko 2020-05-19 15:01:52 -07:00
parent a925e2d783
commit cef708c8ad
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
7 changed files with 7 additions and 34 deletions

View file

@ -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_setMtu(ZT_GoTap *tap,unsigned int mtu);
int ZT_TestCrypto();
int ZT_TestIdentity();
int ZT_TestOther();
#ifdef __cplusplus
}
#endif

View file

@ -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.
func (a Address) CopyTo(b []byte) {
_ = b[4]
b[0] = byte(a >> 32)
b[1] = byte(a >> 24)
b[2] = byte(a >> 16)

View file

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

View file

@ -13,10 +13,10 @@
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 (

View file

@ -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
}

View file

@ -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) {
str[0] = ti->first;
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);
out.push_back((uint8_t)'\n');
}

View file

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