  	rb_ary_push(ary, ossl_x509_new(cert));
      }
  
+diff -up ruby-1.9.1-p243/ext/openssl/ossl_ssl_session.c.orig ruby-1.9.1-p243/ext/openssl/ossl_ssl_session.c
+--- ruby-1.9.1-p243/ext/openssl/ossl_ssl_session.c.orig	2008-07-22 09:34:23.028573696 -0600
++++ ruby-1.9.1-p243/ext/openssl/ossl_ssl_session.c	2010-05-20 13:00:34.813694976 -0600
+@@ -72,6 +72,16 @@ static VALUE ossl_ssl_session_initialize
+ 	return self;
+ }
+ 
++#if HAVE_SSL_SESSION_CMP == 0
++int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b)
++{
++    if (a->ssl_version != b->ssl_version ||
++        a->session_id_length != b->session_id_length)
++        return 1;
++    return memcmp(a->session_id,b-> session_id, a->session_id_length);
++}
++#endif
++
+ /*
+  * call-seq:
+  *    session1 == session2 -> boolean
 diff -up ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c.orig ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c
---- ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c.orig	2008-08-28 21:19:15.064749568 -0600
-+++ ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c	2010-05-17 23:44:05.662700032 -0600
+--- ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c.orig	2008-08-28 21:19:15.029097984 -0600
++++ ruby-1.9.1-p243/ext/openssl/ossl_x509attr.c	2010-05-20 13:00:34.817102848 -0600
 @@ -218,8 +218,9 @@ ossl_x509attr_get_value(VALUE self)
  	ossl_str_adjust(str, p);
      }

diff -up ruby-1.9.1-p243/configure.in.orig ruby-1.9.1-p243/configure.in
--- ruby-1.9.1-p243/configure.in.orig	2009-05-11 09:06:48.052428800 -0600
+++ ruby-1.9.1-p243/configure.in	2010-05-17 23:53:26.615514112 -0600
@@ -1462,11 +1462,11 @@ if test "$with_dln_a_out" != yes; then
 	haiku*) 		case "$target_cpu" in
 			  powerpc*)

     NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th));
     rb_thread_t *th = GET_THREAD();
diff -up ruby-1.9.1-p243/ext/nkf/nkf-utf8/nkf.h.orig ruby-1.9.1-p243/ext/nkf/nkf-utf8/nkf.h
--- ruby-1.9.1-p243/ext/nkf/nkf-utf8/nkf.h.orig	2008-11-11 01:41:20.021757952 -0700
+++ ruby-1.9.1-p243/ext/nkf/nkf-utf8/nkf.h	2010-05-20 13:00:34.794820608 -0600
@@ -164,6 +164,11 @@ void  setbinmode(FILE *fp)
 # ifndef HAVE_LOCALE_H
 #  define HAVE_LOCALE_H
