diff options
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r-- | ext/openssl/ossl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index b7eb79f05..a98f2641c 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -278,9 +278,14 @@ ossl_raise(VALUE exc, const char *fmt, ...) va_list args; char buf[BUFSIZ]; const char *msg; - long e = ERR_peek_last_error(); + long e; int len = 0; +#ifdef HAVE_ERR_PEEK_LAST_ERROR + e = ERR_peek_last_error(); +#else + e = ERR_peek_error(); +#endif if (fmt) { va_start(args, fmt); len = vsnprintf(buf, BUFSIZ, fmt, args); |