aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-01 03:37:06 -0800
committerChris Robinson <[email protected]>2012-03-01 03:46:45 -0800
commit85daab0d5e66534df03dfebd2dc42641398dd29a (patch)
tree74331d9f94a75ac964e436af022afaf8f08c5c54 /Alc/backends/alsa.c
parent105faa193551b0272f62aab3e67f305d3ceeb3e5 (diff)
Don't define lib handles when dynamic loading is disabled
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r--Alc/backends/alsa.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index 7b46a9c2..cf0fd378 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -32,8 +32,8 @@
static const ALCchar alsaDevice[] = "ALSA Default";
-static void *alsa_handle;
#ifdef HAVE_DYNLOAD
+static void *alsa_handle;
#define MAKE_FUNC(f) static typeof(f) * p##f
MAKE_FUNC(snd_strerror);
MAKE_FUNC(snd_pcm_open);
@@ -172,9 +172,9 @@ MAKE_FUNC(snd_card_next);
static ALCboolean alsa_load(void)
{
+#ifdef HAVE_DYNLOAD
if(!alsa_handle)
{
-#ifdef HAVE_DYNLOAD
alsa_handle = LoadLib("libasound.so.2");
if(!alsa_handle)
return ALC_FALSE;
@@ -253,10 +253,8 @@ static ALCboolean alsa_load(void)
LOAD_FUNC(snd_ctl_card_info_get_id);
LOAD_FUNC(snd_card_next);
#undef LOAD_FUNC
-#else
- alsa_handle = (void*)0xDEADBEEF;
-#endif
}
+#endif
return ALC_TRUE;
}