Fix build of OSS driver if soundcard.h is not in sys/

This commit is contained in:
derselbst 2020-02-16 16:43:20 +01:00
parent ab15b32656
commit 7ea9e21081
3 changed files with 11 additions and 4 deletions

View file

@ -45,7 +45,4 @@ ENDIF(NOT WIN32)
MARK_AS_ADVANCED (
OSS_FOUND
OSS_INCLUDE_DIR
LINUX_OSS_INCLUDE_DIR
SYS_OSS_INCLUDE_DIR
MACHINE_OSS_INCLUDE_DIR
)
)

View file

@ -52,6 +52,9 @@
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H @HAVE_LIMITS_H@
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#cmakedefine HAVE_LINUX_SOUNDCARD_H @HAVE_LINUX_SOUNDCARD_H@
/* Define to 1 if you have the <machine/soundcard.h> header file. */
#cmakedefine HAVE_MACHINE_SOUNDCARD_H @HAVE_MACHINE_SOUNDCARD_H@

View file

@ -32,7 +32,14 @@
#if OSS_SUPPORT
#if defined(HAVE_SYS_SOUNDCARD_H)
#include <sys/soundcard.h>
#elif defined(HAVE_LINUX_SOUNDCARD_H)
#include <linux/soundcard.h>
#else
#include <machine/soundcard.h>
#endif
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>