openbsd-ports/x11/emiclock/patches/patch-include_sound_h
2007-10-26 20:44:07 +00:00

976 B

$OpenBSD: patch-include_sound_h,v 1.1 2007/10/26 20:44:07 jasper Exp $
--- include/sound.h.orig Thu Sep 2 16:34:10 1999
+++ include/sound.h Fri Oct 26 22:33:32 2007
@@ -212,17 +212,23 @@ struct SoundCacheBufferTag {
 
 
/*
- * FreeBSD
+ * *BSD
*/
 
-#if defined(__FreeBSD__) && defined(USE_SOUND)
+#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(USE_SOUND)
 
-/* FreeBSD with SoundBlaster Pro */
+/* *BSD with SoundBlaster Pro */
 
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
+#if defined(__FreeBSD__)
#include <machine/soundcard.h>
+#endif
+#if defined(__OpenBSD__)
+#include <sys/ioctl.h>
+#include <sys/audioio.h>
+#endif
 
#undef O_RDWR
#define O_RDWR O_WRONLY /* audio $B%G%P%$%9$OF1;~%*!<%W%s$G$-$J$$!) */
@@ -235,7 +241,7 @@ struct SoundCacheBufferTag {
#define SoundCacheBuffer struct SoundCacheBufferTag
#define AUDIO_DEVICE "/dev/audio"
 
-#endif /* FreeBSD */
+#endif /* *BSD */
 
 
#else /* USE_NETAUDIO */