Build and tests fixes for Solaris Sparc (#4000)
Summary: Here are some fixes for build on Solaris Sparc. It is also fixing CRC test on BigEndian platforms. Closes https://github.com/facebook/rocksdb/pull/4000 Differential Revision: D8455394 Pulled By: ajkr fbshipit-source-id: c9289a7b541a5628139c6b77e84368e14dc3d174
This commit is contained in:
parent
f23fed19a1
commit
906a602c2c
2
env/env_posix.cc
vendored
2
env/env_posix.cc
vendored
@ -20,7 +20,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef OS_LINUX
|
||||
#if defined(OS_LINUX) || defined(OS_SOLARIS)
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/sysmacros.h>
|
||||
|
@ -14,7 +14,7 @@ extern PerfContext perf_context;
|
||||
#else
|
||||
#if defined(OS_SOLARIS)
|
||||
extern __thread PerfContext perf_context_;
|
||||
#define perf_context (*get_perf_context());
|
||||
#define perf_context (*get_perf_context())
|
||||
#else
|
||||
extern __thread PerfContext perf_context;
|
||||
#endif
|
||||
|
@ -8,6 +8,7 @@
|
||||
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
||||
#include "util/crc32c.h"
|
||||
#include "util/testharness.h"
|
||||
#include "util/coding.h"
|
||||
|
||||
namespace rocksdb {
|
||||
namespace crc32c {
|
||||
@ -166,7 +167,8 @@ int main(int argc, char** argv) {
|
||||
const uint64_t* end = (const uint64_t*)(rocksdb::crc32c::buffer + rocksdb::crc32c::BUFFER_SIZE);
|
||||
*dst++ = 0;
|
||||
while (dst < end) {
|
||||
*dst++ = fnv64_buf((const char*)src, sizeof(uint64_t));
|
||||
rocksdb::EncodeFixed64(reinterpret_cast<char*>(dst), fnv64_buf((const char*)src, sizeof(uint64_t)));
|
||||
dst++;
|
||||
src += sizeof(uint64_t);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user