diff options
-rw-r--r-- | make-linux.mk | 1 | ||||
-rw-r--r-- | node/Packet.hpp | 4 |
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 |