diff options
author | John Regan <john@jrjrtech.com> | 2022-05-04 23:05:03 +0200 |
---|---|---|
committer | John Regan <john@jrjrtech.com> | 2022-05-04 23:05:03 +0200 |
commit | 719fa58363ab4e5f6ebd77b4d17f11339d762d3e (patch) | |
tree | 14881a5cc796d4291db301905f71a09beb9f8db5 | |
parent | 708534b83b1c29036081a80d94ac809fb198ef9f (diff) | |
download | luaossl-719fa58363ab4e5f6ebd77b4d17f11339d762d3e.tar.gz luaossl-719fa58363ab4e5f6ebd77b4d17f11339d762d3e.tar.bz2 luaossl-719fa58363ab4e5f6ebd77b4d17f11339d762d3e.zip |
openssl 3.0.0: use new function signature for the dup_func callback
-rw-r--r-- | src/openssl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index 814d95c..92e91ea 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -2846,8 +2846,13 @@ typedef const CRYPTO_EX_DATA const_CRYPTO_EX_DATA; typedef CRYPTO_EX_DATA const_CRYPTO_EX_DATA; #endif +#if OPENSSL_PREREQ(3,0,0) +/* the function signature was fixed in version 3.0.0 */ +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) { +#else 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; +#endif + struct ex_data **data = (struct ex_data **)from_d; if (*data) (*data)->refs++; |