--- ext/thread/thread.c	2009-03-23 06:17:50.000000000 -0400
+++ ext/thread/thread.c	2009-10-21 10:51:03.568750000 -0400
@@ -243,5 +243,4 @@
 }
 
-extern int rb_thread_join _((VALUE thread, double limit));
 #define DELAY_INFTY 1E30
 
--- eval.c	2009-06-07 21:59:39.000000000 -0400
+++ eval.c	2009-10-21 10:53:33.516689000 -0400
@@ -778,5 +778,5 @@
     _frame.flags = 0;			\
     _frame.uniq = frame_unique++;	\
-    ruby_frame = &_frame
+    ruby_frame = (struct FRAME *)&_frame
 
 #define POP_FRAME()  			\
@@ -11472,5 +11472,4 @@
 
 static int rb_thread_join0 _((rb_thread_t, double));
-int rb_thread_join _((VALUE, double));
 
 static int
@@ -12254,4 +12253,5 @@
 	}
     }
+    return NULL;
 }
 
--- intern.h	2009-01-22 01:22:00.000000000 -0500
+++ intern.h	2009-10-21 10:50:59.832103000 -0400
@@ -226,4 +226,5 @@
 VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
 void rb_thread_interrupt _((void));
+int rb_thread_join _((VALUE thread, double limit));
 void rb_thread_trap_eval _((VALUE, int, int));
 void rb_thread_signal_raise _((int));
--- regex.c	2008-08-04 01:15:15.000000000 -0400
+++ regex.c	2009-10-21 11:00:15.281953000 -0400
@@ -1366,5 +1366,5 @@
 	snprintf(error_msg, ERROR_MSG_MAX_SIZE, 
 		 "invalid regular expression; there's no previous pattern, to which '%c' would define cardinality at %d", 
-		 c, p-pattern);
+		 c, (int)(p-pattern));
 	FREE_AND_RETURN(stackb, error_msg);
       }
@@ -2030,5 +2030,5 @@
 	snprintf(error_msg, ERROR_MSG_MAX_SIZE, 
 		 "invalid regular expression; there's no previous pattern, to which '{' would define cardinality at %d", 
-		 p-pattern);
+		 (int)(p-pattern));
 	FREE_AND_RETURN(stackb, error_msg);
       }
--- parse.y	2009-03-08 19:55:21.000000000 -0400
+++ parse.y	2009-10-21 10:57:29.294394000 -0400
@@ -145,5 +145,4 @@
 static NODE *list_concat();
 static NODE *arg_concat();
-static NODE *arg_prepend();
 static NODE *literal_concat();
 static NODE *new_evstr();
@@ -5647,25 +5646,4 @@
 
 static NODE*
-arg_prepend(node1, node2)
-    NODE *node1, *node2;
-{
-    switch (nd_type(node2)) {
-      case NODE_ARRAY:
-	return list_concat(NEW_LIST(node1), node2);
-
-      case NODE_SPLAT:
-	return arg_concat(node1, node2->nd_head);
-
-      case NODE_BLOCK_PASS:
-	node2->nd_body = arg_prepend(node1, node2->nd_body);
-	return node2;
-
-      default:
-	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
-    }
-    return 0;			/* not reached */
-}
-
-static NODE*
 new_call(r,m,a)
     NODE *r;
