summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-08 12:50:56 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-08 12:50:56 -0700
commit6c6b18d003c865619582b254be1ea7f6e11ef58c (patch)
tree86c586b5bdc883d0e5cfee7bb9ecf0bfc4397043
parent4da9d4e53a7fc0e0badf0c487cad531ba7662046 (diff)
downloadinfinitytier-6c6b18d003c865619582b254be1ea7f6e11ef58c.tar.gz
infinitytier-6c6b18d003c865619582b254be1ea7f6e11ef58c.zip
Fix include for system lz4.
-rw-r--r--make-linux.mk1
-rw-r--r--node/Packet.hpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/make-linux.mk b/make-linux.mk
index 8355909f..bd81f4df 100644
--- a/make-linux.mk
+++ b/make-linux.mk
@@ -41,6 +41,7 @@ ifeq ($(wildcard /usr/include/lz4.h),)
OBJS+=ext/lz4/lz4.o
else
LDLIBS+=-llz4
+ DEFS+=-DZT_USE_SYSTEM_LZ4
endif
ifeq ($(wildcard /usr/include/http_parser.h),)
OBJS+=ext/http-parser/http_parser.o
diff --git a/node/Packet.hpp b/node/Packet.hpp
index f3f197e7..79fff344 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -34,7 +34,11 @@
#include "Utils.hpp"
#include "Buffer.hpp"
+#ifdef ZT_USE_SYSTEM_LZ4
+#include <lz4.h>
+#else
#include "../ext/lz4/lz4.h"
+#endif
/**
* Protocol version -- incremented only for major changes