From 50e3221dac1f565fa0486c5d07b6f544fae0786a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Fri, 19 Feb 2021 15:47:17 +0100 Subject: [PATCH] responder: fix warning in activate_unix_sockets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning is with systemd disabled. ``` src/responder/common/responder_common.c: In function ‘activate_unix_sockets’: src/responder/common/responder_common.c:1005:15: error: unused variable ‘sockaddr_len’ [-Werror=unused-variable] 1005 | socklen_t sockaddr_len = sizeof(sockaddr); ``` Reviewed-by: Alexey Tikhonov --- src/responder/common/responder_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 992d85c6d2b..2d1550eb628 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -1001,10 +1001,11 @@ int activate_unix_sockets(struct resp_ctx *rctx, connection_setup_t conn_setup) { int ret; + +#ifdef HAVE_SYSTEMD struct sockaddr_un sockaddr; socklen_t sockaddr_len = sizeof(sockaddr); -#ifdef HAVE_SYSTEMD if (rctx->lfd == -1 && rctx->priv_lfd == -1) { int numfds = (rctx->sock_name ? 1 : 0) + (rctx->priv_sock_name ? 1 : 0);