Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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