mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Build fixes.
This commit is contained in:
parent
a925e2d783
commit
cef708c8ad
7 changed files with 7 additions and 34 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
package zerotier
|
||||
|
||||
//#include "../../native/GoGlue.h"
|
||||
// #include "../../native/GoGlue.h"
|
||||
import "C"
|
||||
|
||||
import (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "ScopedPtr.hpp"
|
||||
#include "Fingerprint.hpp"
|
||||
#include "Containers.hpp"
|
||||
#include "PeerList.hpp"
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue