diff options
| author | Ruini Xue <xueruini@gmail.com> | 2020-02-01 16:37:16 +0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-02-01 07:35:59 -0800 |
| commit | f09cc5ec0940b686f1422cddbdeb53d704b84233 (patch) | |
| tree | 5f4e2e6fde5e782a55b1676bddfa3eb3df3095a6 | |
| parent | 53ae1a5ab37fdfc9ad5c236df3eaf4dd63f0fee9 (diff) | |
| download | nng-f09cc5ec0940b686f1422cddbdeb53d704b84233.tar.gz nng-f09cc5ec0940b686f1422cddbdeb53d704b84233.tar.bz2 nng-f09cc5ec0940b686f1422cddbdeb53d704b84233.zip | |
Fix stats build error.
| -rw-r--r-- | src/core/stats.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/stats.c b/src/core/stats.c index 74b14f59..3c200fec 100644 --- a/src/core/stats.c +++ b/src/core/stats.c @@ -60,9 +60,13 @@ nni_stat_add(nni_stat_item *parent, nni_stat_item *child) void nni_stat_register(nni_stat_item *child) { +#ifdef NNG_ENABLE_STATS nni_mtx_lock(&stats_lock); nni_stat_add(&stats_root, child); nni_mtx_unlock(&stats_lock); +#else + NNI_ARG_UNUSED(child); +#endif } void |
