From 40415cd18068d9df2855c7257fbc53aa16ba5ed9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Jul 2007 20:22:21 +0200 Subject: [PATCH] Fix undefined references in namehint.c Fixed undefined references in namehint.c when not all components are selected via configure options. --- configure.in | 3 +++ src/control/namehint.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/configure.in b/configure.in index 77ebdcdc..2952fc79 100644 --- a/configure.in +++ b/configure.in @@ -358,6 +358,9 @@ fi if test "$build_rawmidi" = "yes"; then AC_DEFINE([BUILD_RAWMIDI], "1", [Build raw MIDI component]) fi +if test "$build_hwdep" = "yes"; then + AC_DEFINE([BUILD_HWDEP], "1", [Build hwdep component]) +fi if test "$build_seq" = "yes"; then AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component]) fi diff --git a/src/control/namehint.c b/src/control/namehint.c index 41011341..7d843ba1 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -90,6 +90,7 @@ static int get_dev_name1(struct hint_list *list, char **res) if (list->device < 0) return 0; switch (list->iface) { +#ifdef BUILD_HWDEP case SND_CTL_ELEM_IFACE_HWDEP: { snd_hwdep_info_t *info; @@ -100,6 +101,8 @@ static int get_dev_name1(struct hint_list *list, char **res) *res = strdup(snd_hwdep_info_get_name(info)); return 0; } +#endif +#ifdef BUILD_PCM case SND_CTL_ELEM_IFACE_PCM: { snd_pcm_info_t *info; @@ -118,6 +121,8 @@ static int get_dev_name1(struct hint_list *list, char **res) *res = strdup(snd_pcm_info_get_name(info)); return 0; } +#endif +#ifdef BUILD_RAWMIDI case SND_CTL_ELEM_IFACE_RAWMIDI: { snd_rawmidi_info_t *info; @@ -129,6 +134,7 @@ static int get_dev_name1(struct hint_list *list, char **res) *res = strdup(snd_rawmidi_info_get_name(info)); return 0; } +#endif default: return 0; } -- 2.47.1