From 629002efac8085a9c6321a15b43a47a43ca0e084 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 30 Aug 2018 11:08:06 -0700 Subject: fixes #686 strtoull() not present on Windows This both makes new functions available to the core, and addresses a bug which would have prevented building the ZeroTier transport on Windows. --- src/transport/zerotier/zerotier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/transport') diff --git a/src/transport/zerotier/zerotier.c b/src/transport/zerotier/zerotier.c index 0b0303d9..95fedc0d 100644 --- a/src/transport/zerotier/zerotier.c +++ b/src/transport/zerotier/zerotier.c @@ -1529,14 +1529,12 @@ zt_walk_moons(const char *path, void *arg) { zt_node * ztn = arg; const char *bn = nni_file_basename(path); - char * ep; uint64_t moonid; if (strncmp(bn, "moon.", 5) != 0) { return (NNI_FILE_WALK_CONTINUE); } - moonid = strtoull(bn + 5, &ep, 16); - if (*ep == '\0') { + if (nni_strtox64(bn + 5, &moonid) == 0) { ZT_Node_orbit(ztn->zn_znode, NULL, moonid, 0); } return (NNI_FILE_WALK_CONTINUE); -- cgit v1.2.3-70-g09d2