summaryrefslogtreecommitdiff
path: root/pcsound/pcsound_bsd.c
diff options
context:
space:
mode:
authorSimon Howard2008-04-15 23:16:16 +0000
committerSimon Howard2008-04-15 23:16:16 +0000
commit125f86e18b31dcf1885164b754bf23ffe3e3bc04 (patch)
treec1801d6ee76733079d6640e74de9c602e9207729 /pcsound/pcsound_bsd.c
parent46a5fbdc25282b0027bd4edd929b46e80546c70c (diff)
downloadchocolate-doom-125f86e18b31dcf1885164b754bf23ffe3e3bc04.tar.gz
chocolate-doom-125f86e18b31dcf1885164b754bf23ffe3e3bc04.tar.bz2
chocolate-doom-125f86e18b31dcf1885164b754bf23ffe3e3bc04.zip
Make the BSD PC speaker driver work on FreeBSD.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1113
Diffstat (limited to 'pcsound/pcsound_bsd.c')
-rw-r--r--pcsound/pcsound_bsd.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/pcsound/pcsound_bsd.c b/pcsound/pcsound_bsd.c
index 68884e0e..6ba73037 100644
--- a/pcsound/pcsound_bsd.c
+++ b/pcsound/pcsound_bsd.c
@@ -26,14 +26,27 @@
#include "config.h"
+// OpenBSD/NetBSD:
+
#ifdef HAVE_DEV_ISA_SPKRIO_H
+#define HAVE_BSD_SPEAKER
+#include <dev/isa/spkrio.h>
+#endif
+
+// FreeBSD
+
+#ifdef HAVE_DEV_SPEAKER_SPEAKER_H
+#define HAVE_BSD_SPEAKER
+#include <dev/speaker/speaker.h>
+#endif
+
+#ifdef HAVE_BSD_SPEAKER
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
-#include <dev/isa/spkrio.h>
#include <sys/ioctl.h>
#include <sys/signal.h>
#include <sys/socket.h>
@@ -310,5 +323,5 @@ pcsound_driver_t pcsound_bsd_driver =
PCSound_BSD_Shutdown,
};
-#endif /* #ifdef HAVE_DEV_ISA_SPKRIO_H */
+#endif /* #ifdef HAVE_BSD_SPEAKER */