From b9e78ce2eeff7bf87428869fb921096eaad788d7 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:18:07 +0200 Subject: [PATCH] Merge pull request #15 from ClickHouse/try-fix-data-race Fix 'undefined symbol: pthread_atfork' on PowerPC64 (cherry picked from commit 450a5638704386356f8e520080468fc9bc8bcaf8) --- cpp/src/arrow/util/mutex.cc | 6 +++--- cpp/src/arrow/util/mutex.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/util/mutex.cc b/cpp/src/arrow/util/mutex.cc index 892dc2f11fea0..184a3fdf08b3a 100644 --- a/cpp/src/arrow/util/mutex.cc +++ b/cpp/src/arrow/util/mutex.cc @@ -19,7 +19,7 @@ #include -#ifndef _WIN32 +#if !defined( _WIN32) && !defined(__ppc64__) #include #include #endif @@ -59,7 +59,7 @@ Mutex::Guard Mutex::Lock() { Mutex::Mutex() : impl_(new Impl, [](Impl* impl) { delete impl; }) {} -#ifndef _WIN32 +#if !defined( _WIN32) && !defined(__ppc64__) namespace { struct AfterForkState { @@ -106,7 +106,7 @@ Mutex* GlobalForkSafeMutex() { return AfterForkState::instance.mutex; } -#endif // _WIN32 +#endif // _WIN32 and __ppc64__ } // namespace util } // namespace arrow diff --git a/cpp/src/arrow/util/mutex.h b/cpp/src/arrow/util/mutex.h index ac63cf70cd9ae..c32aa8a1ef76d 100644 --- a/cpp/src/arrow/util/mutex.h +++ b/cpp/src/arrow/util/mutex.h @@ -60,7 +60,7 @@ class ARROW_EXPORT Mutex { std::unique_ptr impl_; }; -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__ppc64__) /// Return a pointer to a process-wide, process-specific Mutex that can be used /// at any point in a child process. NULL is returned when called in the parent. ///