From dd2006d494e85a41d8b818b37460e7cf458a2aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Jul 2023 20:07:53 +0200 Subject: [PATCH] tcp-proxy: fix build --- osdep/Phy.hpp | 4 ++++ tcp-proxy/tcp-proxy.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index 4a71629cc..58c403ac2 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -50,7 +50,9 @@ #include #include +#ifndef ZT_NO_METRICS #include "../node/Metrics.hpp" +#endif #if defined(__linux__) || defined(linux) || defined(__LINUX__) || defined(__linux) #ifndef IPV6_DONTFRAG @@ -476,7 +478,9 @@ public: sizeof(struct sockaddr_in)) == (long)len); #endif if (sent) { +#ifndef ZT_NO_METRICS Metrics::udp_send += len; +#endif } return sent; diff --git a/tcp-proxy/tcp-proxy.cpp b/tcp-proxy/tcp-proxy.cpp index d57351987..a7d3309f5 100644 --- a/tcp-proxy/tcp-proxy.cpp +++ b/tcp-proxy/tcp-proxy.cpp @@ -41,6 +41,7 @@ #include #include +#define ZT_NO_METRICS 1 #include "../osdep/Phy.hpp" #define ZT_TCP_PROXY_CONNECTION_TIMEOUT_SECONDS 300