]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: backend: fix compilation without ssl
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 Feb 2021 12:49:42 +0000 (13:49 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 Feb 2021 12:49:42 +0000 (13:49 +0100)
sni_smp/sni_hash are reported as unused on compilation without
USE_OPENSL and may cause compilation failure

This does not need to be backported.

src/backend.c

index 639fbd781ad56d31d1dd4718ee6b34cf0f1c7978..5f6f03863996815810b1a8aae2a8acf344434b0e 100644 (file)
@@ -1265,12 +1265,17 @@ int connect_server(struct stream *s)
        int reuse = 0;
        int init_mux = 0;
        int err;
+#ifdef USE_OPENSSL
        struct sample *sni_smp = NULL;
+#endif
        struct sockaddr_storage *bind_addr;
        int proxy_line_ret;
        int64_t hash = 0;
        struct conn_hash_params hash_params;
-       XXH64_hash_t sni_hash, proxy_hash;
+#ifdef USE_OPENSSL
+       XXH64_hash_t sni_hash;
+#endif
+       XXH64_hash_t proxy_hash;
 
        /* first, set unique connection parameters and then calculate hash */
        memset(&hash_params, 0, sizeof(hash_params));