1 alsa-lib: provide dummy definitions of RTLD_* if necessary
3 The FLAT GNU toolchain (e.g. blackfin) doesn't include the dlfcn.h header
4 file, so we need to guard that include. Additionally, provide dummy
5 definitions for parameters RTLD_GLOBAL / RTLD_NOW which are normally
8 Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
9 [Thomas: don't add separate dlmisc.h, move dummy defs to global.h]
10 Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
12 diff --git a/include/global.h b/include/global.h
13 --- a/include/global.h
14 +++ b/include/global.h
15 @@ -97,6 +97,16 @@ extern struct snd_dlsym_link *snd_dlsym_
16 /** \brief Returns the version of a dynamic symbol as a string. */
17 #define SND_DLSYM_VERSION(version) __STRING(version)
19 +/* RTLD_NOW and RTLD_GLOBAL (used for 'mode' in snd_dlopen) are not defined
20 + * on all arches (e.g. blackfin), so provide a dummy definition here. */
26 +#define RTLD_GLOBAL 0
29 void *snd_dlopen(const char *file, int mode);
30 void *snd_dlsym(void *handle, const char *name, const char *version);
31 int snd_dlclose(void *handle);
32 diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c
33 --- a/modules/mixer/simple/sbasedl.c
34 +++ b/modules/mixer/simple/sbasedl.c
37 #include <sys/ioctl.h>
44 #include "asoundlib.h"
45 #include "mixer_abst.h"
46 diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
47 --- a/src/mixer/simple_abst.c
48 +++ b/src/mixer/simple_abst.c
51 #include <sys/ioctl.h>
58 #include "asoundlib.h"
59 #include "mixer_simple.h"