From 10a0b2193303063167a297f542c4de0952a4cd25 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Sat, 26 Sep 2015 16:59:13 +0200 Subject: alsa: Fix FTBFS with old versions of ALSA (fixes #4) --- backends/alsa/alsa-device.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends/alsa/alsa-device.c') diff --git a/backends/alsa/alsa-device.c b/backends/alsa/alsa-device.c index f76478f..fb12447 100644 --- a/backends/alsa/alsa-device.c +++ b/backends/alsa/alsa-device.c @@ -24,6 +24,7 @@ #include #include +#include "alsa-compat.h" #include "alsa-constants.h" #include "alsa-device.h" #include "alsa-element.h" @@ -707,11 +708,13 @@ load_element (AlsaDevice *device, snd_mixer_elem_t *el) gboolean cenum = FALSE; gboolean penum = FALSE; +#if SND_LIB_VERSION >= ALSA_PACK_VERSION (1, 0, 10) /* The enumeration may have a capture or a playback capability. * If it has either both or none, try to guess the more appropriate * direction. */ cenum = snd_mixer_selem_is_enum_capture (el); penum = snd_mixer_selem_is_enum_playback (el); +#endif if (cenum ^ penum) { if (cenum == TRUE) direction = MATE_MIXER_DIRECTION_INPUT; -- cgit v1.2.1