diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2014-09-19 01:50:16 +0200 |
---|---|---|
committer | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2014-09-19 01:50:16 +0200 |
commit | 4fbf23238e3f927871576170d1a38c855e04473e (patch) | |
tree | d17d876e91becb783182e427013f7ea802731980 /services/audioflinger | |
parent | f129e84addb1b0ba1240f39430404dad717c21c2 (diff) | |
download | frameworks_av-4fbf23238e3f927871576170d1a38c855e04473e.zip frameworks_av-4fbf23238e3f927871576170d1a38c855e04473e.tar.gz frameworks_av-4fbf23238e3f927871576170d1a38c855e04473e.tar.bz2 |
Allow building on clang without __builtin_assume_aligned
Clang versions up to and including 3.5 don't have
__builtin_assume_aligned.
Define it to a reasonable approximation when building with those.
Change-Id: I223ccfda6e6ae55ce29dda5e4cacc1b162728b2c
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioResamplerSinc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/audioflinger/AudioResamplerSinc.cpp b/services/audioflinger/AudioResamplerSinc.cpp index e50b192..938ec11 100644 --- a/services/audioflinger/AudioResamplerSinc.cpp +++ b/services/audioflinger/AudioResamplerSinc.cpp @@ -30,7 +30,10 @@ #include "AudioResamplerSinc.h" - +#if defined(__clang__) && !__has_builtin(__builtin_assume_aligned) +#define __builtin_assume_aligned(p, a) \ + (((uintptr_t(p) % (a)) == 0) ? (p) : (__builtin_unreachable(), (p))) +#endif #if defined(__arm__) && !defined(__thumb__) #define USE_INLINE_ASSEMBLY (true) |