From 75544b76f8cf11d61f1f99a97ea1fbb8d2dde572 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:46:23 -0500 Subject: [PATCH] fix the build --- programs/ziti-edge-tunnel/netif_driver/darwin/utun.h | 1 + programs/ziti-edge-tunnel/netif_driver/linux/tun.h | 1 + programs/ziti-edge-tunnel/ziti-edge-tunnel.c | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h b/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h index 31ead3685..7692c74bd 100644 --- a/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h +++ b/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h @@ -26,5 +26,6 @@ struct netif_handle_s { }; extern netif_driver utun_open(char *error, size_t error_len, const char *cidr); +extern const char* get_tun_name(netif_handle tun); #endif //ZITI_TUNNELER_SDK_UTUN_H diff --git a/programs/ziti-edge-tunnel/netif_driver/linux/tun.h b/programs/ziti-edge-tunnel/netif_driver/linux/tun.h index 73c83cd8d..2274b986b 100644 --- a/programs/ziti-edge-tunnel/netif_driver/linux/tun.h +++ b/programs/ziti-edge-tunnel/netif_driver/linux/tun.h @@ -29,5 +29,6 @@ struct netif_handle_s { }; extern netif_driver tun_open(struct uv_loop_s *loop, uint32_t tun_ip, uint32_t dns_ip, const char *cidr, char *error, size_t error_len); +extern const char* get_tun_name(netif_handle tun); #endif //ZITI_TUNNELER_SDK_TUN_H diff --git a/programs/ziti-edge-tunnel/ziti-edge-tunnel.c b/programs/ziti-edge-tunnel/ziti-edge-tunnel.c index 1b6655974..0eeb755fc 100644 --- a/programs/ziti-edge-tunnel/ziti-edge-tunnel.c +++ b/programs/ziti-edge-tunnel/ziti-edge-tunnel.c @@ -1317,13 +1317,15 @@ static void run(int argc, char *argv[]) { //set log level in precedence: command line flag (-v/--verbose) -> env var (ZITI_LOG) -> config file int log_level = get_log_level(configured_log_level); + log_writer log_fn = NULL; #if _WIN32 signal(SIGINT, interrupt_handler); log_init(global_loop_ref, log_level, ziti_log_writer); // level from config file set below + log_fn = ziti_log_writer; remove_all_nrpt_rules(DEFAULT_EXECUTABLE_NAME, false); //remove all rules starting with ziti-edge-tunnel #else - ziti_log_init(global_loop_ref, log_level, ziti_log_writer); + ziti_log_init(global_loop_ref, log_level, log_fn); #endif // generate tunnel status instance and save active state and start time