[alsa-devel] [PATCH] salsa-lib: define __SALSA_EXPORT_FUNC in version.h
We have to include "global.h" to define __SALSA_EXPORT_FUNC
--- salsa-lib-0.1.3/src/version.h.in +++ salsa-lib-0.1.3-1/src/version.h.in @@ -1,6 +1,8 @@ #ifndef __ALSA_VERSION_H #define __ALSA_VERSION_H
+#include "global.h" + #define SND_LIB_MAJOR @SND_LIB_MAJOR@ #define SND_LIB_MINOR @SND_LIB_MINOR@ #define SND_LIB_SUBMINOR @SND_LIB_SUBMINOR@
At Tue, 12 Mar 2013 01:43:29 +0200, Mihail Zenkov wrote:
We have to include "global.h" to define __SALSA_EXPORT_FUNC
Thanks, applied.
Takashi
--- salsa-lib-0.1.3/src/version.h.in +++ salsa-lib-0.1.3-1/src/version.h.in @@ -1,6 +1,8 @@ #ifndef __ALSA_VERSION_H #define __ALSA_VERSION_H
+#include "global.h"
#define SND_LIB_MAJOR @SND_LIB_MAJOR@ #define SND_LIB_MINOR @SND_LIB_MINOR@ #define SND_LIB_SUBMINOR @SND_LIB_SUBMINOR@ _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Tue, 12 Mar 2013 09:26:01 +0100, Takashi Iwai wrote:
At Tue, 12 Mar 2013 01:43:29 +0200, Mihail Zenkov wrote:
We have to include "global.h" to define __SALSA_EXPORT_FUNC
Thanks, applied.
Thinking of this again, it's better not to include global.h in that place. I applied the patch below on top.
Takashi
--- Subject: [PATCH] Shuffle the inclusion of version.h
Instead of including global.h from version.h, shuffle the inclusion order in asondlib.h. Also add an ifdef guard in version.h just to be sure.
Signed-off-by: Takashi Iwai tiwai@suse.de --- src/asoundlib-head.h | 2 +- src/version.h.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/asoundlib-head.h b/src/asoundlib-head.h index f72518f..a852fbe 100644 --- a/src/asoundlib-head.h +++ b/src/asoundlib-head.h @@ -39,8 +39,8 @@ extern "C" {
#include "recipe.h" #include "asoundef.h" -#include "version.h" #include "global.h" +#include "version.h" #include "input.h" #include "output.h" #include "error.h" diff --git a/src/version.h.in b/src/version.h.in index 8d031b8..ef13d06 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,8 +1,6 @@ #ifndef __ALSA_VERSION_H #define __ALSA_VERSION_H
-#include "global.h" - #define SND_LIB_MAJOR @SND_LIB_MAJOR@ #define SND_LIB_MINOR @SND_LIB_MINOR@ #define SND_LIB_SUBMINOR @SND_LIB_SUBMINOR@ @@ -14,10 +12,12 @@ /* library version (string) */ #define SND_LIB_VERSION_STR "@SND_LIB_VERSION@"
+#ifdef __SALSA_EXPORT_FUNC __SALSA_EXPORT_FUNC const char *snd_asoundlib_version(void) { return SND_LIB_VERSION_STR; } +#endif /* __SALSA_EXPORT_FUNC */
#endif /* __ALSA_VERSION_H */
participants (2)
-
Mihail Zenkov
-
Takashi Iwai