diff --git a/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Group_ProcessListManagement_cpp b/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Group_ProcessListManagement_cpp new file mode 100644 index 00000000000..eb96211d329 --- /dev/null +++ b/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Group_ProcessListManagement_cpp @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_agent_Core_ApplicationPool_Group_ProcessListManagement_cpp,v 1.1 2021/01/09 23:00:29 naddy Exp $ + +Fix build with libc++ 10.0. +https://github.com/phusion/passenger/commit/d0d660bbdbb51079ad60188882596810273b1616 + +Index: src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +--- src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp.orig ++++ src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +@@ -305,7 +305,7 @@ Group::detachedProcessesCheckerMain(GroupPtr self) { + while (true) { + assert(detachedProcessesCheckerActive); + +- if (getLifeStatus() == SHUT_DOWN || this_thread::interruption_requested()) { ++ if (getLifeStatus() == SHUT_DOWN || boost::this_thread::interruption_requested()) { + UPDATE_TRACE_POINT(); + P_DEBUG("Stopping detached processes checker"); + detachedProcessesCheckerActive = false; diff --git a/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Pool_GarbageCollection_cpp b/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Pool_GarbageCollection_cpp new file mode 100644 index 00000000000..7212bacf849 --- /dev/null +++ b/www/ruby-passenger/patches/patch-src_agent_Core_ApplicationPool_Pool_GarbageCollection_cpp @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_agent_Core_ApplicationPool_Pool_GarbageCollection_cpp,v 1.1 2021/01/09 23:00:29 naddy Exp $ + +Fix build with libc++ 10.0. +https://github.com/phusion/passenger/commit/d0d660bbdbb51079ad60188882596810273b1616 + +Index: src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +--- src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp.orig ++++ src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +@@ -55,7 +55,7 @@ Pool::garbageCollect(PoolPtr self) { + self->garbageCollectionCond.timed_wait(lock, + posix_time::seconds(5)); + } +- while (!this_thread::interruption_requested()) { ++ while (!boost::this_thread::interruption_requested()) { + try { + UPDATE_TRACE_POINT(); + unsigned long long sleepTime = self->realGarbageCollect(); diff --git a/www/ruby-passenger/patches/patch-src_cxx_supportlib_oxt_system_calls_cpp b/www/ruby-passenger/patches/patch-src_cxx_supportlib_oxt_system_calls_cpp new file mode 100644 index 00000000000..6c33fa5c1f6 --- /dev/null +++ b/www/ruby-passenger/patches/patch-src_cxx_supportlib_oxt_system_calls_cpp @@ -0,0 +1,75 @@ +$OpenBSD: patch-src_cxx_supportlib_oxt_system_calls_cpp,v 1.1 2021/01/09 23:00:29 naddy Exp $ + +Fix build with libc++ 10.0. +https://github.com/phusion/passenger/commit/d0d660bbdbb51079ad60188882596810273b1616 + +Index: src/cxx_supportlib/oxt/system_calls.cpp +--- src/cxx_supportlib/oxt/system_calls.cpp.orig ++++ src/cxx_supportlib/oxt/system_calls.cpp +@@ -132,15 +132,15 @@ shouldSimulateFailure() { + _my_errno = errno; \ + } while ((error_expression) \ + && _my_errno == EINTR \ +- && (!this_thread::syscalls_interruptable() \ +- || !(_intr_requested = this_thread::interruption_requested())) \ ++ && (!boost::this_thread::syscalls_interruptable() \ ++ || !(_intr_requested = boost::this_thread::interruption_requested())) \ + ); \ + if (OXT_LIKELY(ctx != NULL)) { \ + ctx->syscall_interruption_lock.lock(); \ + } \ + if ((error_expression) \ + && _my_errno == EINTR \ +- && this_thread::syscalls_interruptable() \ ++ && boost::this_thread::syscalls_interruptable() \ + && _intr_requested) { \ + throw thread_interrupted(); \ + } \ +@@ -284,8 +284,8 @@ syscalls::close(int fd) { + } + if (ret == -1 + && errno == EINTR +- && this_thread::syscalls_interruptable() +- && this_thread::interruption_requested()) { ++ && boost::this_thread::syscalls_interruptable() ++ && boost::this_thread::interruption_requested()) { + throw thread_interrupted(); + } else { + return ret; +@@ -662,8 +662,8 @@ syscalls::nanosleep(const struct timespec *req, struct + } + } while (ret == -1 + && e == EINTR +- && (!this_thread::syscalls_interruptable() +- || !(intr_requested = this_thread::interruption_requested())) ++ && (!boost::this_thread::syscalls_interruptable() ++ || !(intr_requested = boost::this_thread::interruption_requested())) + ); + + if (OXT_UNLIKELY(ctx != NULL)) { +@@ -672,7 +672,7 @@ syscalls::nanosleep(const struct timespec *req, struct + + if (ret == -1 + && e == EINTR +- && this_thread::syscalls_interruptable() ++ && boost::this_thread::syscalls_interruptable() + && intr_requested) { + throw thread_interrupted(); + } +@@ -748,14 +748,14 @@ syscalls::waitpid(pid_t pid, int *status, int options) + * http://stackoverflow.com/questions/20410943/segmentation-fault-when-accessing-statically-initialized-thread-variable?noredirect=1#comment30483943_20410943 + * https://bugzilla.redhat.com/show_bug.cgi?id=731228 + */ +- __thread int this_thread::_syscalls_interruptable = 1; ++ __thread int boost::this_thread::_syscalls_interruptable = 1; + + bool + boost::this_thread::syscalls_interruptable() { + return _syscalls_interruptable; + } + #else +- boost::thread_specific_ptr this_thread::_syscalls_interruptable; ++ boost::thread_specific_ptr boost::this_thread::_syscalls_interruptable; + + bool + boost::this_thread::syscalls_interruptable() {