Skip to content

Commit

Permalink
Explicitly include openssl before zlib.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
daztucker committed Jul 20, 2018
1 parent 95d41e9 commit c77bc73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c77bc73

Please sign in to comment.