Skip to content

Commit

Permalink
Merge pull request #15 from ClickHouse/try-fix-data-race
Browse files Browse the repository at this point in the history
Fix 'undefined symbol: pthread_atfork' on PowerPC64

(cherry picked from commit 450a563)
  • Loading branch information
Avogar authored and nikitamikhaylov committed Oct 15, 2024
1 parent 6664491 commit b9e78ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cpp/src/arrow/util/mutex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <mutex>

#ifndef _WIN32
#if !defined( _WIN32) && !defined(__ppc64__)
#include <pthread.h>
#include <atomic>
#endif
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -106,7 +106,7 @@ Mutex* GlobalForkSafeMutex() {

return AfterForkState::instance.mutex;
}
#endif // _WIN32
#endif // _WIN32 and __ppc64__

} // namespace util
} // namespace arrow
2 changes: 1 addition & 1 deletion cpp/src/arrow/util/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ARROW_EXPORT Mutex {
std::unique_ptr<Impl, void (*)(Impl*)> 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.
///
Expand Down

0 comments on commit b9e78ce

Please sign in to comment.