summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-01 01:52:13 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-01 01:52:13 +0000
commit79bf99f7b27c02428e7807e044a241626553d407 (patch)
tree5ac86460314d4bf6edb3e6a2b6835adf00853b7a /ext/openssl/ossl.c
parentab509c0edb4d2631772018cebbbb5dd3c06b0582 (diff)
* ext/openssl/extconf.rb: should check ERR_peek_last_error().
[ruby-dev:27597] * ext/openssl/ossl.c (ossl_raise): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index b7eb79f..a98f264 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);