mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-25 07:35:51 -07:00
use system libs for json and http-parser
This commit is contained in:
parent
cfe0d0971f
commit
477c36351b
7 changed files with 33 additions and 1 deletions
|
@ -39,7 +39,11 @@
|
|||
#include "../osdep/Thread.hpp"
|
||||
#include "../osdep/BlockingQueue.hpp"
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "../ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
#include "JSONDB.hpp"
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@
|
|||
|
||||
#include "../node/Constants.hpp"
|
||||
#include "../node/Utils.hpp"
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "../ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
#include "../osdep/OSUtils.hpp"
|
||||
|
||||
namespace ZeroTier {
|
||||
|
|
|
@ -16,7 +16,13 @@ include objects.mk
|
|||
|
||||
# Use bundled http-parser since distribution versions are NOT API-stable or compatible!
|
||||
# Trying to use dynamically linked libhttp-parser causes tons of compatibility problems.
|
||||
OBJS+=ext/http-parser/http_parser.o
|
||||
#OBJS+=ext/http-parser/http_parser.o
|
||||
|
||||
# Use system json
|
||||
DEFS+=-DZT_USE_SYSTEM_JSON
|
||||
# Use system http-parser
|
||||
DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER
|
||||
LDLIBS+=-lhttp_parser
|
||||
|
||||
# Auto-detect miniupnpc and nat-pmp as well and use system libs if present,
|
||||
# otherwise build into binary as done on Mac and Windows.
|
||||
|
|
4
one.cpp
4
one.cpp
|
@ -76,7 +76,11 @@
|
|||
|
||||
#include "service/OneService.hpp"
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
#define ZT_PID_PATH "zerotier-one.pid"
|
||||
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "../ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
|
|
@ -73,7 +73,11 @@
|
|||
#include "../ext/http-parser/http_parser.h"
|
||||
#endif
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "../ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
|
|
|
@ -32,7 +32,11 @@
|
|||
#include "../node/Array.hpp"
|
||||
#include "../node/Packet.hpp"
|
||||
|
||||
#ifdef ZT_USE_SYSTEM_JSON
|
||||
#include <json.hpp>
|
||||
#else
|
||||
#include "../ext/json/json.hpp"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* VERB_USER_MESSAGE type ID for software update messages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue