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.
This commit is contained in:
Darren Tucker 2018-07-20 13:48:51 +10:00
parent 95d41e90ea
commit c77bc73c91
1 changed files with 12 additions and 0 deletions

View File

@ -61,6 +61,18 @@
#include <signal.h>
#include <time.h>
/*
* Explicitly include OpenSSL before zlib as some versions of OpenSSL have
* "free_func" in their headers, which zlib typedefs.
*/
#ifdef WITH_OPENSSL
# include <openssl/bn.h>
# include <openssl/evp.h>
# ifdef OPENSSL_HAS_ECC
# include <openssl/ec.h>
# endif
#endif
#include <zlib.h>
#include "xmalloc.h"