$OpenBSD: patch-swfdec-gtk_swfdec_playback_oss_c,v 1.1 2008/08/20 15:55:15 jasper Exp $
--- swfdec-gtk/swfdec_playback_oss.c.orig	Tue Jul 29 11:52:44 2008
+++ swfdec-gtk/swfdec_playback_oss.c	Thu Aug 14 13:42:00 2008
@@ -23,7 +23,11 @@
 #endif
 
 #include <sys/ioctl.h>
+#if defined(__OpenBSD__)
+#include <soundcard.h>
+#else
 #include <sys/soundcard.h>
+#endif /* __OpenBSD__ */
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -31,10 +35,10 @@
 
 #include "swfdec_playback.h"
 
-/** @file Implements swfdec audio playback by opening /dev/dsp per stream
+/** @file Implements swfdec audio playback by opening /dev/audio per stream
  * and playing out through that.
  *
- * Allowing multiple access to /dev/dsp is not required by the OSS API spec,
+ * Allowing multiple access to /dev/audio is not required by the OSS API spec,
  * but FreeBSD's sound system lets you, which is what this file was written
  * for.
  */
@@ -115,11 +119,19 @@ swfdec_playback_stream_open (SwfdecPlayback *sound, Sw
   guint rate;
   int dsp_fd, ret, format, channels, fragsize;
 
+#if defined(__OpenBSD__)
+  dsp_fd = open("/dev/audio", O_WRONLY);
+  if (dsp_fd == -1) {
+    g_printerr ("Failed to open /dev/audio\n");
+    return;
+  }
+#else
   dsp_fd = open("/dev/dsp", O_WRONLY);
   if (dsp_fd == -1) {
     g_printerr ("Failed to open /dev/dsp\n");
     return;
   }
+#endif
 
   format = AFMT_S16_LE;
   ret = ioctl(dsp_fd, SNDCTL_DSP_SETFMT, &format);
