Merge pull request #272 from vapier/master

Fix Android/MIPS build.
This commit is contained in:
Chris Mumford 2016-01-12 10:47:33 -08:00
commit 5d36bedd1c

View File

@ -39,6 +39,8 @@
#define ARCH_CPU_ARM64_FAMILY 1 #define ARCH_CPU_ARM64_FAMILY 1
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__) #elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
#define ARCH_CPU_PPC_FAMILY 1 #define ARCH_CPU_PPC_FAMILY 1
#elif defined(__mips__)
#define ARCH_CPU_MIPS_FAMILY 1
#endif #endif
namespace leveldb { namespace leveldb {
@ -110,6 +112,13 @@ inline void MemoryBarrier() {
} }
#define LEVELDB_HAVE_MEMORY_BARRIER #define LEVELDB_HAVE_MEMORY_BARRIER
// MIPS
#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(__GNUC__)
inline void MemoryBarrier() {
__asm__ __volatile__("sync" : : : "memory");
}
#define LEVELDB_HAVE_MEMORY_BARRIER
#endif #endif
// AtomicPointer built using platform-specific MemoryBarrier() // AtomicPointer built using platform-specific MemoryBarrier()