Skip to content

Commit

Permalink
fix building with PAIR and PUBSUB disabled (nanomsg#1530)
Browse files Browse the repository at this point in the history
When building with PAIR and PUBSUB protocols disabled, the perf tools fail to compile.

This makes some minor tweaks to correct that
  • Loading branch information
urkle authored and JaylinYu committed Nov 29, 2021
1 parent 8d8e7b6 commit 297f7bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/tools/perf/pubdrop.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#else

#define NNG_OPT_SUB_SUBSCRIBE "sub:subscribe"

static void die(const char *, ...);

static int
Expand Down

0 comments on commit 297f7bf

Please sign in to comment.