diff options
| author | Edward Rudd <urkle@outoforder.cc> | 2021-11-26 12:54:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-26 09:54:58 -0800 |
| commit | 1ab464628bb4518f5868df11d033368caaa0a106 (patch) | |
| tree | 1d70fe9bc39a7618f1c5614e5b49ae17f225a808 /src/tools/perf | |
| parent | c42f32722447cc52810b25decee634210f09d70e (diff) | |
| download | nng-1ab464628bb4518f5868df11d033368caaa0a106.tar.gz nng-1ab464628bb4518f5868df11d033368caaa0a106.tar.bz2 nng-1ab464628bb4518f5868df11d033368caaa0a106.zip | |
fix building with PAIR and PUBSUB disabled (#1530)
When building with PAIR and PUBSUB protocols disabled, the perf tools fail to compile.
This makes some minor tweaks to correct that
Diffstat (limited to 'src/tools/perf')
| -rw-r--r-- | src/tools/perf/perf.c | 4 | ||||
| -rw-r--r-- | src/tools/perf/pubdrop.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/perf/perf.c b/src/tools/perf/perf.c index accac621..46d91cd8 100644 --- a/src/tools/perf/perf.c +++ b/src/tools/perf/perf.c @@ -45,6 +45,10 @@ static open_func open_client = no_open; #define nng_pair0_open no_open #endif +#if !defined(NNG_HAVE_PAIR0) && !defined(NNG_HAVE_PAIR1) +#define nng_pair_open no_open +#endif + #if defined(NNG_HAVE_REQ0) #include <nng/protocol/reqrep0/req.h> #else diff --git a/src/tools/perf/pubdrop.c b/src/tools/perf/pubdrop.c index 41ac5ba0..f7e1dbfd 100644 --- a/src/tools/perf/pubdrop.c +++ b/src/tools/perf/pubdrop.c @@ -27,6 +27,8 @@ #else +#define NNG_OPT_SUB_SUBSCRIBE "sub:subscribe" + static void die(const char *, ...); static int |
