From 85daab0d5e66534df03dfebd2dc42641398dd29a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 1 Mar 2012 03:37:06 -0800 Subject: Don't define lib handles when dynamic loading is disabled --- Alc/backends/sndio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Alc/backends/sndio.c') diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c index 4866a0a5..6be98c2f 100644 --- a/Alc/backends/sndio.c +++ b/Alc/backends/sndio.c @@ -33,8 +33,8 @@ static const ALCchar sndio_device[] = "SndIO Default"; -static void *sndio_handle; #ifdef HAVE_DYNLOAD +static void *sndio_handle; #define MAKE_FUNC(x) static typeof(x) * p##x MAKE_FUNC(sio_initpar); MAKE_FUNC(sio_open); @@ -76,9 +76,9 @@ MAKE_FUNC(sio_onvol); static ALCboolean sndio_load(void) { +#ifdef HAVE_DYNLOAD if(!sndio_handle) { -#ifdef HAVE_DYNLOAD sndio_handle = LoadLib("libsndio.so"); if(!sndio_handle) return ALC_FALSE; @@ -109,10 +109,8 @@ static ALCboolean sndio_load(void) LOAD_FUNC(sio_setvol); LOAD_FUNC(sio_onvol); #undef LOAD_FUNC -#else - sndio_handle = (void*)0xDEADBEEF; -#endif } +#endif return ALC_TRUE; } -- cgit v1.2.3