Compilation fixes for powerpc build, -Wparentheses-equality error and missing header guards

Summary:
This pull request contains miscellaneous compilation fixes.

Thanks,
Chinmay
Closes https://github.com/facebook/rocksdb/pull/3462

Differential Revision: D6941424

Pulled By: sagar0

fbshipit-source-id: fe9c26507bf131221f2466740204bff40a15614a
main
Chinmay Kamat 7 years ago committed by Facebook Github Bot
parent d62af7fa4f
commit 9fc72d6f16
  1. 2
      monitoring/perf_context_imp.h
  2. 3
      tools/db_stress.cc
  3. 3
      tools/write_stress.cc
  4. 2
      util/crc32c.cc

@ -43,7 +43,7 @@ extern __thread PerfContext perf_context;
#define PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(metric, condition) \
PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), true); \
if ((condition)) { \
if (condition) { \
perf_step_timer_##metric.Start(); \
}

@ -28,7 +28,10 @@ int main() {
}
#else
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif // __STDC_FORMAT_MACROS
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>

@ -56,7 +56,10 @@ int main() {
}
#else
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif // __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <atomic>
#include <random>

@ -39,8 +39,10 @@
namespace rocksdb {
namespace crc32c {
#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
#ifdef __powerpc64__
static int arch_ppc_crc32 = 0;
#endif /* __powerpc64__ */
#endif
static const uint32_t table0_[256] = {

Loading…
Cancel
Save