aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto_callback.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/crypto_callback.h')
-rw-r--r--lib/crypto/c_src/crypto_callback.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/crypto/c_src/crypto_callback.h b/lib/crypto/c_src/crypto_callback.h
index 894d86cfd9..2641cc0c8b 100644
--- a/lib/crypto/c_src/crypto_callback.h
+++ b/lib/crypto/c_src/crypto_callback.h
@@ -18,13 +18,20 @@
* %CopyrightEnd%
*/
+#include <openssl/crypto.h>
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+# define CCB_FILE_LINE_ARGS
+#else
+# define CCB_FILE_LINE_ARGS , const char *file, int line
+#endif
+
struct crypto_callbacks
{
size_t sizeof_me;
- void* (*crypto_alloc)(size_t size);
- void* (*crypto_realloc)(void* ptr, size_t size);
- void (*crypto_free)(void* ptr);
+ void* (*crypto_alloc)(size_t size CCB_FILE_LINE_ARGS);
+ void* (*crypto_realloc)(void* ptr, size_t size CCB_FILE_LINE_ARGS);
+ void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS);
/* openssl callbacks */
#ifdef OPENSSL_THREADS