summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-el
blob: fd4a391771c38103cbd1c38f83a013b6e82b9571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-el,v 1.1 2010/09/10 03:29:01 taca Exp $

* r18172: suppress warnings.

--- ext/openssl/ossl_rand.c.orig	2008-05-29 18:15:50.000000000 +0000
+++ ext/openssl/ossl_rand.c
@@ -99,7 +99,7 @@ ossl_rand_bytes(VALUE self, VALUE len)
     int n = NUM2INT(len);
 
     str = rb_str_new(0, n);
-    if (!RAND_bytes(RSTRING_PTR(str), n)) {
+    if (!RAND_bytes((unsigned char *)RSTRING_PTR(str), n)) {
 	ossl_raise(eRandomError, NULL);
     }
 
@@ -118,7 +118,7 @@ ossl_rand_pseudo_bytes(VALUE self, VALUE
     int n = NUM2INT(len);
 
     str = rb_str_new(0, n);
-    if (!RAND_pseudo_bytes(RSTRING_PTR(str), n)) {
+    if (!RAND_pseudo_bytes((unsigned char *)RSTRING_PTR(str), n)) {
 	ossl_raise(eRandomError, NULL);
     }