Created
May 30, 2012 14:36
-
-
Save pigoz/2836699 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d468b63093500ff33562b1f0ca22ca646fe24c13 Mon Sep 17 00:00:00 2001 | |
From: Stefano Pigozzi <stefano.pigozzi@gmail.com> | |
Date: Wed, 30 May 2012 16:27:22 +0200 | |
Subject: [PATCH] lavu: fix compilation with Apple's llvm-gcc | |
Change DECLARE_ASM_CONST macro not to use the static qualifier, | |
preventing a linking failure when using the declared costant from a | |
function's scope. | |
In practice, this fixes the compilation of software like mplayer that | |
fails to link vf_fspp. | |
--- | |
libavutil/mem.h | 3 +++ | |
1 files changed, 3 insertions(+), 0 deletions(-) | |
diff --git a/libavutil/mem.h b/libavutil/mem.h | |
index c6c907e..e6c7a62 100644 | |
--- a/libavutil/mem.h | |
+++ b/libavutil/mem.h | |
@@ -46,6 +46,9 @@ | |
#define DECLARE_ASM_CONST(n,t,v) \ | |
AV_PRAGMA(DATA_ALIGN(v,n)) \ | |
static const t __attribute__((aligned(n))) v | |
+#elif defined(__GNUC__) && defined(__llvm__) && defined(__APPLE_CC__) | |
+ #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v | |
+ #define DECLARE_ASM_CONST(n,t,v) const t av_used __attribute__ ((aligned (n))) v | |
#elif defined(__GNUC__) | |
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v | |
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v | |
-- | |
1.7.7.5 (Apple Git-26) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment