From c77bc73c91bc656e343a1961756e09dd1b170820 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 20 Jul 2018 13:48:51 +1000 Subject: [PATCH] Explicitly include openssl before zlib. Some versions of OpenSSL have "free_func" in their headers, which zlib typedefs. Including openssl after zlib (eg via sshkey.h) results in "syntax error before `free_func'", which this fixes. --- packet.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packet.c b/packet.c index 0ae65bd32..dcf35e6e6 100644 --- a/packet.c +++ b/packet.c @@ -61,6 +61,18 @@ #include #include +/* + * Explicitly include OpenSSL before zlib as some versions of OpenSSL have + * "free_func" in their headers, which zlib typedefs. + */ +#ifdef WITH_OPENSSL +# include +# include +# ifdef OPENSSL_HAS_ECC +# include +# endif +#endif + #include #include "xmalloc.h"