Emeric reported that the build fails without USE_OPENSSL, which is caused
by a last-minute change I did yesterday evening. It shows up as "ssl_cert"
not being part of a structure.

If you get this, please use the attached patch.

Regards,
Willy

>From ff9f7698fcefef66bceb1ec32a3da8b14947a594 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <[email protected]>
Date: Tue, 4 Sep 2012 15:13:20 +0200
Subject: [PATCH] BUILD: fix build error without SSL (ssl_cert)

One last-minute optimization broke the build without SSL support.
Move ssl_cert out of the #ifdef/#endif and it's OK.
---
 include/types/protocols.h |    2 +-
 src/haproxy.c             |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/include/types/protocols.h b/include/types/protocols.h
index 4e40a67..b075ef6 100644
--- a/include/types/protocols.h
+++ b/include/types/protocols.h
@@ -130,8 +130,8 @@ struct listener {
        char *interface;                /* interface name or NULL */
        int maxseg;                     /* for TCP, advertised MSS */
 
-#ifdef USE_OPENSSL
        char *ssl_cert;                 /* ssl certificate */
+#ifdef USE_OPENSSL
        struct {
                SSL_CTX *ctx;
                char *ciphers;          /* cipher suite to use if non-null */
diff --git a/src/haproxy.c b/src/haproxy.c
index adf2614..4e75080 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -996,9 +996,7 @@ void deinit(void)
                        l_next = l->next;
                        unbind_listener(l);
                        delete_listener(l);
-#ifdef USE_OPENSSL
                        free(l->ssl_cert);
-#endif
                        free(l->name);
                        free(l->counters);
                        free(l);
-- 
1.7.1

Reply via email to