]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: build without openssl still broken
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2017 13:35:19 +0000 (15:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Aug 2017 17:21:31 +0000 (19:21 +0200)
As mentionned in commit cf4e496c9 ("BUG/MEDIUM: build without openssl broken"),
commit 872f9c213 ("MEDIUM: ssl: add basic support for OpenSSL crypto engine")
broke the build without openssl support. But the former did only fix it when
openssl is not enabled, but not when it's not installed on the system :

In file included from src/haproxy.c:112:
include/proto/ssl_sock.h:24:25: openssl/ssl.h: No such file or directory
In file included from src/haproxy.c:112:
include/proto/ssl_sock.h:45: error: syntax error before "SSL_CTX"
include/proto/ssl_sock.h:75: error: syntax error before '*' token
include/proto/ssl_sock.h:75: warning: type defaults to `int' in declaration of `ssl_sock_create_cert'
include/proto/ssl_sock.h:75: warning: data definition has no type or storage class
include/proto/ssl_sock.h:76: error: syntax error before '*' token
include/proto/ssl_sock.h:76: warning: type defaults to `int' in declaration of `ssl_sock_get_generated_cert'
include/proto/ssl_sock.h:76: warning: data definition has no type or storage class
include/proto/ssl_sock.h:77: error: syntax error before '*' token

Now we also surround the include with #ifdef USE_OPENSSL to fix this. No
backport is needed since openssl async engines were not backported.

src/haproxy.c

index 52722db85503d10fd7da6013adabe5b955248ef1..7af4ab479c761a43b2fa64d2124388dbf5c21fc3 100644 (file)
 #include <proto/task.h>
 #include <proto/dns.h>
 #include <proto/vars.h>
+#ifdef USE_OPENSSL
 #include <proto/ssl_sock.h>
+#endif
 
 /* list of config files */
 static struct list cfg_cfgfiles = LIST_HEAD_INIT(cfg_cfgfiles);