$OpenBSD$
--- uthread_gc.c.orig	Sat Sep  2 18:38:47 2006
+++ uthread_gc.c	Sat Sep  2 18:38:47 2006
@@ -0,0 +1,32 @@
+/* Stub for pthreads _thread_gc() function: it just sleeps */
+/* for use with /usr/lib/libpthread.a */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <pthread_np.h>
+#include "pthread_private.h"
+
+static struct timeval  tm;
+static struct timezone tz;
+static char   buffer[64];
+
+void *_thread_gc(void *p) {
+	pthread_set_name_np(pthread_self(),"gc stub");
+	while(1) {
+		gettimeofday(&tm,&tz);
+/*
+		snprintf( buffer, sizeof(buffer), "%ld.%06ld _thread_gc: sleeping\n",  tm.tv_sec % 10, tm.tv_usec );
+		stdout_debug(buffer);
+*/
+		sleep(86000);
+/*
+		gettimeofday(&tm,&tz);
+		snprintf( buffer, sizeof(buffer), "%ld.%06ld _thread_gc: awakened!\n", tm.tv_sec % 10, tm.tv_usec );
+		stdout_debug(buffer);
+*/
+	}
+	gettimeofday(&tm,&tz);
+	snprintf( buffer, sizeof(buffer), "%ld.%06ld _thread_gc: impossible!\n", tm.tv_sec % 10, tm.tv_usec );
+	PANIC(buffer);
+}
