diff options
author | 2016-10-29 21:19:37 -0700 | |
---|---|---|
committer | 2016-10-29 21:19:37 -0700 | |
commit | 8caed30aa43a9a8e5bb3333e9408cd29c14fbf15 (patch) | |
tree | b8c17c1318423b86f29831af5700d5b0f13fa479 /src | |
parent | f88b333f9eaa605a0f7a835874b5b562b294b1c3 (diff) | |
download | luaossl-8caed30aa43a9a8e5bb3333e9408cd29c14fbf15.tar.gz luaossl-8caed30aa43a9a8e5bb3333e9408cd29c14fbf15.tar.bz2 luaossl-8caed30aa43a9a8e5bb3333e9408cd29c14fbf15.zip |
fix constantness warning with OpenSSL 1.1 API
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index 88c34d8..fd392d7 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -1788,7 +1788,13 @@ static struct ex_type { [EX_SSL_CTX_ALPN_SELECT_CB] = { CRYPTO_EX_INDEX_SSL_CTX, -1, &SSL_CTX_get_ex_data, &SSL_CTX_set_ex_data }, }; -static int ex_ondup(CRYPTO_EX_DATA *to NOTUSED, CRYPTO_EX_DATA *from NOTUSED, void *from_d, int idx NOTUSED, long argl NOTUSED, void *argp NOTUSED) { +#if OPENSSL_PREREQ(1,1,0) +typedef const CRYPTO_EX_DATA const_CRYPTO_EX_DATA; +#else +typedef CRYPTO_EX_DATA const_CRYPTO_EX_DATA; +#endif + +static int ex_ondup(CRYPTO_EX_DATA *to NOTUSED, const_CRYPTO_EX_DATA *from NOTUSED, void *from_d, int idx NOTUSED, long argl NOTUSED, void *argp NOTUSED) { struct ex_data **data = from_d; if (*data) |