summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-en
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby18-base/patches/patch-en')
-rw-r--r--lang/ruby18-base/patches/patch-en40
1 files changed, 40 insertions, 0 deletions
diff --git a/lang/ruby18-base/patches/patch-en b/lang/ruby18-base/patches/patch-en
new file mode 100644
index 00000000000..ae78b555619
--- /dev/null
+++ b/lang/ruby18-base/patches/patch-en
@@ -0,0 +1,40 @@
+$NetBSD: patch-en,v 1.1 2010/09/10 03:29:01 taca Exp $
+
+* r18172: suppress warnings.
+
+--- ext/openssl/ossl_x509req.c.orig 2007-06-08 15:02:04.000000000 +0000
++++ ext/openssl/ossl_x509req.c
+@@ -99,7 +99,7 @@ static VALUE
+ ossl_x509req_initialize(int argc, VALUE *argv, VALUE self)
+ {
+ BIO *in;
+- X509_REQ *req;
++ X509_REQ *req, *x = DATA_PTR(self);
+ VALUE arg;
+
+ if (rb_scan_args(argc, argv, "01", &arg) == 0) {
+@@ -107,10 +107,12 @@ ossl_x509req_initialize(int argc, VALUE
+ }
+ arg = ossl_to_der_if_possible(arg);
+ in = ossl_obj2bio(arg);
+- req = PEM_read_bio_X509_REQ(in, (X509_REQ **)&DATA_PTR(self), NULL, NULL);
++ req = PEM_read_bio_X509_REQ(in, &x, NULL, NULL);
++ DATA_PTR(self) = x;
+ if (!req) {
+- BIO_reset(in);
+- req = d2i_X509_REQ_bio(in, (X509_REQ **)&DATA_PTR(self));
++ (void)BIO_reset(in);
++ req = d2i_X509_REQ_bio(in, &x);
++ DATA_PTR(self) = x;
+ }
+ BIO_free(in);
+ if (!req) ossl_raise(eX509ReqError, NULL);
+@@ -171,7 +173,7 @@ ossl_x509req_to_der(VALUE self)
+ if ((len = i2d_X509_REQ(req, NULL)) <= 0)
+ ossl_raise(eX509CertError, NULL);
+ str = rb_str_new(0, len);
+- p = RSTRING_PTR(str);
++ p = (unsigned char *)RSTRING_PTR(str);
+ if (i2d_X509_REQ(req, &p) <= 0)
+ ossl_raise(eX509ReqError, NULL);
+ ossl_str_adjust(str, p);