cmus / cmus

Small, fast and powerful console music player for Unix-like operating systems.
https://cmus.github.io/
GNU General Public License v2.0
5.49k stars 467 forks source link

OSS fixes for soundcard.h include path #359

Open marillat opened 8 years ago

marillat commented 8 years ago

OSS doesn't build. This patch fix this problem :+1:

--- a/configure
+++ b/configure
@@ -313,8 +313,8 @@ check_oss()

    OSS_CFLAGS=""
    OSS_LIBS=""
-   msg_checking "for header <sys/soundcard.h>"
-   if test -f /usr/include/sys/soundcard.h
+   msg_checking "for header <linux/soundcard.h>"
+   if test -f /usr/include/linux/soundcard.h
    then
        msg_result "yes"
        makefile_vars OSS_CFLAGS OSS_LIBS
--- a/mixer_oss.c
+++ b/mixer_oss.c
@@ -29,7 +29,7 @@
 #if defined(__OpenBSD__)
 #include <soundcard.h>
 #else
-#include <sys/soundcard.h>
+#include <linux/soundcard.h>
 #endif

 enum {
--- a/oss.c
+++ b/oss.c
@@ -24,7 +24,7 @@
 #if defined(__OpenBSD__)
 #include <soundcard.h>
 #else
-#include <sys/soundcard.h>
+#include <linux/soundcard.h>
 #endif
 #include <sys/ioctl.h>
 #include <sys/types.h>
flyingmutant commented 8 years ago

On what system does OSS fail to build?

I believe OSS is primarily useful on non-linux unixes, so hardcoding linux is most probably wrong thing to do.

marillat commented 8 years ago

Linux and kfreebsd.

Some people still use OSS under Linux.

flyingmutant commented 8 years ago

Yeah, sure — but we must be certain that non-linux builds are not broken by this change. Also, I do not see <linux/soundcard.h> anywhere in the OSS documentation.

BTW, what version of OSS do you have installed?

marillat commented 8 years ago

oss4-dev package version 4.2-build2010-4 from Debian unstable