X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Falsa-lib%2F0003-dlmisc.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Falsa-lib%2F0003-dlmisc.patch;h=05dc70ee7ea269fd83fa173a31beb9b78f9aba3e;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0003-dlmisc.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0003-dlmisc.patch new file mode 100644 index 0000000..05dc70e --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/alsa-lib/0003-dlmisc.patch @@ -0,0 +1,57 @@ +alsa-lib: provide dummy definitions of RTLD_* if necessary + +The FLAT GNU toolchain (e.g. blackfin) doesn't include the dlfcn.h header +file, so we need to guard that include. Additionally, provide dummy +definitions for parameters RTLD_GLOBAL / RTLD_NOW which are normally +provided by dlfcn.h. + +Signed-off-by: Sonic Zhang +[Thomas: don't add separate dlmisc.h, move dummy defs to global.h] +Signed-off-by: Thomas De Schampheleire + +diff --git a/include/global.h b/include/global.h +--- a/include/global.h ++++ b/include/global.h +@@ -97,6 +97,16 @@ extern struct snd_dlsym_link *snd_dlsym_ + /** \brief Returns the version of a dynamic symbol as a string. */ + #define SND_DLSYM_VERSION(version) __STRING(version) + ++/* RTLD_NOW and RTLD_GLOBAL (used for 'mode' in snd_dlopen) are not defined ++ * on all arches (e.g. blackfin), so provide a dummy definition here. */ ++#ifndef RTLD_NOW ++#define RTLD_NOW 0 ++#endif ++ ++#ifndef RTLD_GLOBAL ++#define RTLD_GLOBAL 0 ++#endif ++ + void *snd_dlopen(const char *file, int mode); + void *snd_dlsym(void *handle, const char *name, const char *version); + int snd_dlclose(void *handle); +diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c +--- a/modules/mixer/simple/sbasedl.c ++++ b/modules/mixer/simple/sbasedl.c +@@ -27,7 +27,9 @@ + #include + #include + #include ++#ifdef HAVE_LIBDL + #include ++#endif + #include "config.h" + #include "asoundlib.h" + #include "mixer_abst.h" +diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c +--- a/src/mixer/simple_abst.c ++++ b/src/mixer/simple_abst.c +@@ -34,7 +34,9 @@ + #include + #include + #include ++#ifdef HAVE_LIBDL + #include ++#endif + #include "config.h" + #include "asoundlib.h" + #include "mixer_simple.h"