summaryrefslogtreecommitdiff
path: root/package/ruby/patches/patch-ext_openssl_ossl_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/ruby/patches/patch-ext_openssl_ossl_c')
-rw-r--r--package/ruby/patches/patch-ext_openssl_ossl_c29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/ruby/patches/patch-ext_openssl_ossl_c b/package/ruby/patches/patch-ext_openssl_ossl_c
new file mode 100644
index 000000000..2b649c7dd
--- /dev/null
+++ b/package/ruby/patches/patch-ext_openssl_ossl_c
@@ -0,0 +1,29 @@
+--- ruby-1.9.1-p378.orig/ext/openssl/ossl.c 2009-01-15 16:39:30.000000000 +0100
++++ ruby-1.9.1-p378/ext/openssl/ossl.c 2010-06-12 21:01:58.171613505 +0200
+@@ -92,7 +92,7 @@ ossl_x509_ary2sk(VALUE ary)
+
+ #define OSSL_IMPL_SK2ARY(name, type) \
+ VALUE \
+-ossl_##name##_sk2ary(STACK *sk) \
++ossl_##name##_sk2ary(STACK_OF(type) *sk) \
+ { \
+ type *t; \
+ int i, num; \
+@@ -102,7 +102,7 @@ ossl_##name##_sk2ary(STACK *sk) \
+ OSSL_Debug("empty sk!"); \
+ return Qnil; \
+ } \
+- num = sk_num(sk); \
++ num = sk_##type##_num(sk); \
+ if (num < 0) { \
+ OSSL_Debug("items in sk < -1???"); \
+ return rb_ary_new(); \
+@@ -110,7 +110,7 @@ ossl_##name##_sk2ary(STACK *sk) \
+ ary = rb_ary_new2(num); \
+ \
+ for (i=0; i<num; i++) { \
+- t = (type *)sk_value(sk, i); \
++ t = sk_##type##_value(sk, i); \
+ rb_ary_push(ary, ossl_##name##_new(t)); \
+ } \
+ return ary; \