Skip to content

Commit

Permalink
Compilation fixes for powerpc build, -Wparentheses-equality error and…
Browse files Browse the repository at this point in the history
… missing header guards

Summary:
This pull request contains miscellaneous compilation fixes.

Thanks,
Chinmay
Closes facebook#3462

Differential Revision: D6941424

Pulled By: sagar0

fbshipit-source-id: fe9c26507bf131221f2466740204bff40a15614a
  • Loading branch information
cdkamat authored and facebook-github-bot committed Feb 9, 2018
1 parent d62af7f commit 9fc72d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion monitoring/perf_context_imp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(); \
}

Expand Down
3 changes: 3 additions & 0 deletions tools/db_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions tools/write_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions util/crc32c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit 9fc72d6

Please sign in to comment.