mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
Self test almost builds, now need skeleton EthernetTap implementation for Windows.
This commit is contained in:
parent
1f9a7e26ba
commit
150a53eb17
13 changed files with 51 additions and 61 deletions
|
@ -44,8 +44,8 @@
|
|||
|
||||
namespace ZeroTier {
|
||||
|
||||
const Demarc::Port Demarc::ANY_PORT;
|
||||
const Demarc::Port Demarc::NULL_PORT;
|
||||
const Demarc::Port Demarc::ANY_PORT = (Port)0xffffffffffffffffULL;
|
||||
const Demarc::Port Demarc::NULL_PORT = (Port)0;
|
||||
|
||||
Demarc::Demarc(const RuntimeEnvironment *renv) :
|
||||
_r(renv)
|
||||
|
|
|
@ -64,12 +64,12 @@ public:
|
|||
/**
|
||||
* Port identifier used to refer to any port
|
||||
*/
|
||||
static const Port ANY_PORT = (Port)0xffffffffffffffffULL;
|
||||
static const Port ANY_PORT;
|
||||
|
||||
/**
|
||||
* Port identifier used to refer to null port / port not found
|
||||
*/
|
||||
static const Port NULL_PORT = (Port)0;
|
||||
static const Port NULL_PORT;
|
||||
|
||||
Demarc(const RuntimeEnvironment *renv);
|
||||
~Demarc();
|
||||
|
|
|
@ -351,7 +351,7 @@ Node::ReasonForTermination Node::run()
|
|||
|
||||
// Make sure networks.d exists
|
||||
#ifdef __WINDOWS__
|
||||
CreateDirectory((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),NULL);
|
||||
CreateDirectoryA((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),NULL);
|
||||
#else
|
||||
mkdir((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),0700);
|
||||
#endif
|
||||
|
|
|
@ -220,11 +220,11 @@ std::map<std::string,bool> Utils::listDirectory(const char *path)
|
|||
|
||||
#ifdef __WINDOWS__
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA ffd;
|
||||
if ((hFind = FindFirstFile((std::string(path) + "\\*").c_str(),&ffd)) != INVALID_HANDLE_VALUE) {
|
||||
WIN32_FIND_DATAA ffd;
|
||||
if ((hFind = FindFirstFileA((std::string(path) + "\\*").c_str(),&ffd)) != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
r[std::string(ffd.cFileName)] = ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0);
|
||||
} while (FindNextFile(hFind,&ffd));
|
||||
} while (FindNextFileA(hFind,&ffd));
|
||||
FindClose(hFind);
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
throw()
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
return (DeleteFile(path) != FALSE);
|
||||
return (DeleteFileA(path) != FALSE);
|
||||
#else
|
||||
return (unlink(path) == 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue