summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/linuxaudiodev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c
index 5bcbaf2..72ba567 100644
--- a/Modules/linuxaudiodev.c
+++ b/Modules/linuxaudiodev.c
@@ -27,10 +27,20 @@
#endif
#include <sys/ioctl.h>
+#if defined(linux)
#include <linux/soundcard.h>
typedef unsigned long uint32_t;
+#elif defined(__FreeBSD__)
+#include <machine/soundcard.h>
+
+#ifndef SNDCTL_DSP_CHANNELS
+#define SNDCTL_DSP_CHANNELS SOUND_PCM_WRITE_CHANNELS
+#endif
+
+#endif
+
typedef struct {
PyObject_HEAD;
int x_fd; /* The open file */