$NetBSD: patch-ai,v 1.7 2003/04/17 23:14:13 nathanw Exp $

--- xmms/main.c.orig	2002-02-27 09:30:28.000000000 -0500
+++ xmms/main.c	2003-04-16 15:41:12.000000000 -0400
@@ -3377,7 +3377,7 @@
 {
 	gchar *filename;
 	struct cmdlineopt options;
-#if defined(HAVE_SCHED_SETSCHEDULER) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+#if defined(HAVE_SCHED_SETSCHEDULER) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && !defined(__NetBSD__)
 	struct sched_param sparam;
 #endif
 
@@ -3387,7 +3387,9 @@
 #endif
 
 	signal(SIGPIPE, SIG_IGN); /* for controlsocket.c */
+#if 0 /* XXXNJW This makes debugging nearly impossible. */
 	signal(SIGSEGV, segfault_handler);
+#endif
 	g_thread_init(NULL);
 	if (!g_thread_supported())
 	{
@@ -3408,7 +3410,7 @@
 
 	if (geteuid() == 0)
 	{
-#if defined(HAVE_SCHED_SETSCHEDULER) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+#if defined(HAVE_SCHED_SETSCHEDULER) && defined(HAVE_SCHED_GET_PRIORITY_MAX) && !defined(__NetBSD__)
 		if (cfg.use_realtime)
 		{
 			sparam.sched_priority = sched_get_priority_max(SCHED_RR);
@@ -3500,8 +3502,8 @@
 
 	/* enable_x11r5_session_management(argc, argv); */
 	sm_init(argc, argv);
-	GDK_THREADS_LEAVE();
 	gtk_main();
+	GDK_THREADS_LEAVE();
 
 	return 0;
 }
