$NetBSD: patch-af,v 1.3 2006/01/06 16:53:49 wiz Exp $

--- src/nautilus-main.c.orig	2005-08-17 21:16:10.000000000 +0200
+++ src/nautilus-main.c
@@ -58,6 +58,24 @@
 #include <string.h>
 #include <unistd.h>
 
+#ifdef __NetBSD__
+#include <pthread.h>
+
+/*
+ * Pth is non-preemptive, so we yield the processor periodically
+ */
+
+#ifdef _PTH_PTHREAD_H_
+static gint
+pth_nbschedule (gpointer data)
+{
+	sched_yield();
+
+	return TRUE;
+}
+#endif /* _PTH_PTHREAD_H_ */
+#endif /* __NetBSD__ */
+
 /* Keeps track of everyone who wants the main event loop kept active */
 static GSList *event_loop_registrants;
 
@@ -421,6 +439,10 @@ main (int argc, char *argv[])
 	} else {
 		/* Run the nautilus application. */
 		application = nautilus_application_new ();
+
+#ifdef _PTH_PTHREAD_H_
+	gtk_timeout_add (200, pth_nbschedule, NULL);
+#endif
 		nautilus_application_startup
 			(application,
 			 kill_shell, restart_shell, no_default_window, no_desktop,
