$OpenBSD: patch-app_drivers_oss_input_c,v 1.1.1.1 2002/02/05 18:04:10 espie Exp $
--- app/drivers/oss-input.c.orig	Sat Aug  4 07:14:49 2001
+++ app/drivers/oss-input.c	Mon Feb  4 04:10:05 2002
@@ -32,7 +32,13 @@
 #include <sys/ioctl.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <sys/soundcard.h>
+#ifdef HAVE_SYS_SOUNDCARD_H
+# include <sys/soundcard.h>
+#elif HAVE_MACHINE_SOUNDCARD_H
+# include <machine/soundcard.h>
+#elif HAVE_SOUNDCARD_H
+# include <soundcard.h>
+#endif
 #include <sys/time.h>
 
 #include <glib.h>
@@ -54,7 +60,7 @@ typedef struct oss_driver {
     int fragsize;
     int mf;
 
-    GMutex *configmutex;
+    pthread_mutex_t configmutex;
 
     int soundfd;
     void *sndbuf;
@@ -150,7 +156,9 @@ oss_new (void)
     d->soundfd = -1;
     d->sndbuf = NULL;
     d->polltag = 0;
-    d->configmutex = g_mutex_new();
+    if (pthread_mutex_init(&d->configmutex, NULL) != 0) {
+        return NULL;
+    }
 
     oss_make_config_widgets(d);
 
@@ -163,7 +171,7 @@ oss_destroy (void *dp)
     oss_driver * const d = dp;
 
     gtk_widget_destroy(d->configwidget);
-    g_mutex_free(d->configmutex);
+    pthread_mutex_destroy(&d->configmutex);
 
     g_free(dp);
 }
