diff options
author | Darren Tucker <dtucker@dtucker.net> | 2018-07-20 13:48:51 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2018-07-20 13:48:51 +1000 |
commit | c77bc73c91bc656e343a1961756e09dd1b170820 (patch) | |
tree | bea499e9c9aeca97f773c6dedb4654e4f2c75d43 | |
parent | 95d41e90eafcd1286a901e8e361e4a37b98aeb52 (diff) |
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.
-rw-r--r-- | packet.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -61,6 +61,18 @@ | |||
61 | #include <signal.h> | 61 | #include <signal.h> |
62 | #include <time.h> | 62 | #include <time.h> |
63 | 63 | ||
64 | /* | ||
65 | * Explicitly include OpenSSL before zlib as some versions of OpenSSL have | ||
66 | * "free_func" in their headers, which zlib typedefs. | ||
67 | */ | ||
68 | #ifdef WITH_OPENSSL | ||
69 | # include <openssl/bn.h> | ||
70 | # include <openssl/evp.h> | ||
71 | # ifdef OPENSSL_HAS_ECC | ||
72 | # include <openssl/ec.h> | ||
73 | # endif | ||
74 | #endif | ||
75 | |||
64 | #include <zlib.h> | 76 | #include <zlib.h> |
65 | 77 | ||
66 | #include "xmalloc.h" | 78 | #include "xmalloc.h" |