summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-01 19:43:06 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-01 19:43:06 -0700
commita9a390a930493bba3b64a20fb20e55f304062b0a (patch)
tree04de7ea5092800ad4ec05383676284b6ac875025 /node
parentd7344871e6b8edee9f6a9cbaa3bb924429d8abcb (diff)
downloadinfinitytier-a9a390a930493bba3b64a20fb20e55f304062b0a.tar.gz
infinitytier-a9a390a930493bba3b64a20fb20e55f304062b0a.zip
Apply @marning suggested SSE auto-detect to make builds easier on non-x86 platforms: https://github.com/mwarning/ZeroTierOne/commit/aa2fd044cb69b97eef1ea38d5fefd18543aae22a
Diffstat (limited to 'node')
-rw-r--r--node/Salsa20.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/node/Salsa20.hpp b/node/Salsa20.hpp
index 0c1f3be4..9631a6db 100644
--- a/node/Salsa20.hpp
+++ b/node/Salsa20.hpp
@@ -7,10 +7,16 @@
#ifndef ZT_SALSA20_HPP
#define ZT_SALSA20_HPP
+#include <stdio.h>
#include <stdint.h>
+#include <stdlib.h>
#include "Constants.hpp"
+#if (!defined(ZT_SALSA20_SSE)) && (defined(__SSE2__) || defined(__WINDOWS__))
+#define ZT_SALSA20_SSE 1
+#endif
+
#ifdef ZT_SALSA20_SSE
#include <emmintrin.h>
#endif // ZT_SALSA20_SSE