From 91556d0c55e53d99e01295148b06b0f332b10237 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 26 Apr 2021 18:11:01 -0400 Subject: [PATCH] Build fixes. --- core/FCV.hpp | 1 + core/MAC.hpp | 3 ++- core/Poly1305.cpp | 5 +---- core/Poly1305.hpp | 2 ++ core/version.h.in | 8 ++++---- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/FCV.hpp b/core/FCV.hpp index 1e6739174..6326ec4de 100644 --- a/core/FCV.hpp +++ b/core/FCV.hpp @@ -15,6 +15,7 @@ #define ZT_FCV_HPP #include "Constants.hpp" +#include "Utils.hpp" #include #include diff --git a/core/MAC.hpp b/core/MAC.hpp index 159893d83..0c32dfe76 100644 --- a/core/MAC.hpp +++ b/core/MAC.hpp @@ -32,7 +32,8 @@ class MAC : public TriviallyCopyable { } ZT_INLINE - MAC(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d, const uint8_t e, const uint8_t f) noexcept + MAC(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d, const uint8_t e, const uint8_t f) + noexcept : m_mac( (((uint64_t)a) << 40U) | (((uint64_t)b) << 32U) | (((uint64_t)c) << 24U) | (((uint64_t)d) << 16U) | (((uint64_t)e) << 8U) | ((uint64_t)f)) diff --git a/core/Poly1305.cpp b/core/Poly1305.cpp index a2b217b07..c913eb6ac 100644 --- a/core/Poly1305.cpp +++ b/core/Poly1305.cpp @@ -6,13 +6,10 @@ Public domain. // Small modifications have been made for ZeroTier, but this code remains in the public domain. -#include "Poly1305.hpp" - #include "Constants.hpp" +#include "Poly1305.hpp" #include "Utils.hpp" -#include - #ifdef __WINDOWS__ #pragma warning(disable : 4146) #endif diff --git a/core/Poly1305.hpp b/core/Poly1305.hpp index 98c6cc4f8..bd1f130c1 100644 --- a/core/Poly1305.hpp +++ b/core/Poly1305.hpp @@ -14,6 +14,8 @@ #ifndef ZT_POLY1305_HPP #define ZT_POLY1305_HPP +#include "Constants.hpp" + namespace ZeroTier { #define ZT_POLY1305_KEY_SIZE 32 diff --git a/core/version.h.in b/core/version.h.in index 0b2ec2501..cc43aed1b 100644 --- a/core/version.h.in +++ b/core/version.h.in @@ -17,17 +17,17 @@ /** * Major version */ -#define ZEROTIER_VERSION_MAJOR @ZEROTIER_VERSION_MAJOR @ +#define ZEROTIER_VERSION_MAJOR @ZEROTIER_VERSION_MAJOR@ /** * Minor version */ -#define ZEROTIER_VERSION_MINOR @ZEROTIER_VERSION_MINOR @ +#define ZEROTIER_VERSION_MINOR @ZEROTIER_VERSION_MINOR@ /** * Revision */ -#define ZEROTIER_VERSION_REVISION @ZEROTIER_VERSION_REVISION @ +#define ZEROTIER_VERSION_REVISION @ZEROTIER_VERSION_REVISION@ /** * Build version @@ -36,6 +36,6 @@ * to force a minor update without an actual version number change. It's * not part of the actual release version number. */ -#define ZEROTIER_VERSION_BUILD @ZEROTIER_VERSION_BUILD @ +#define ZEROTIER_VERSION_BUILD @ZEROTIER_VERSION_BUILD@ #endif