summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-11-04 11:20:38 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-11-04 11:20:38 -0800
commit1bd5a1ebcd6fb99b6a1c723514a8bf354486a443 (patch)
treee093a73374c19e1acf9681aac2b7b9e3c6437c89 /node
parent14e4ffd15fdef2e5e024b706c7959986570a189a (diff)
downloadinfinitytier-1bd5a1ebcd6fb99b6a1c723514a8bf354486a443.tar.gz
infinitytier-1bd5a1ebcd6fb99b6a1c723514a8bf354486a443.zip
Make selftest build and run on FreeBSD 10 with gmake
Diffstat (limited to 'node')
-rw-r--r--node/Constants.hpp15
-rw-r--r--node/InetAddress.h0
-rw-r--r--node/InetAddress.hpp1
3 files changed, 16 insertions, 0 deletions
diff --git a/node/Constants.hpp b/node/Constants.hpp
index 83c98e0f..82d25459 100644
--- a/node/Constants.hpp
+++ b/node/Constants.hpp
@@ -58,6 +58,21 @@
#include <endian.h>
#endif
+#ifdef __FreeBSD__
+#ifndef __UNIX_LIKE__
+#define __UNIX_LIKE__
+#endif
+#ifndef __BSD__
+#define __BSD__
+#endif
+#include <machine/endian.h>
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER _BYTE_ORDER
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#endif
+#endif
+
// TODO: Android is what? Linux technically, but does it define it?
#ifdef __APPLE__
diff --git a/node/InetAddress.h b/node/InetAddress.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/node/InetAddress.h
diff --git a/node/InetAddress.hpp b/node/InetAddress.hpp
index 0ddb2cd4..06da9de6 100644
--- a/node/InetAddress.hpp
+++ b/node/InetAddress.hpp
@@ -45,6 +45,7 @@
#else
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <sys/socket.h>
#endif
namespace ZeroTier {