--- signal.c.orig	2020-03-31 04:42:18.000000000 -0700
+++ signal.c	2020-08-26 19:07:37.000000000 -0700
@@ -767,7 +767,7 @@ NORETURN(void ruby_thread_stack_overflow
 # elif !(defined(HAVE_UCONTEXT_H) && (defined __i386__ || defined __x86_64__ || defined __amd64__))
 # elif defined __linux__
 #   define USE_UCONTEXT_REG 1
-# elif defined __APPLE__
+# elif defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
 #   define USE_UCONTEXT_REG 1
 # elif defined __FreeBSD__
 #   define USE_UCONTEXT_REG 1
--- vm_dump.c.orig	2020-03-31 04:42:18.000000000 -0700
+++ vm_dump.c	2020-08-27 14:31:29.000000000 -0700
@@ -911,7 +911,7 @@ rb_dump_machine_register(const ucontext_
 	dump_machine_register(SS);
 #   endif
     }
-# elif defined __APPLE__
+# elif defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
     {
 	const mcontext_t mctx = ctx->uc_mcontext;
 #   if defined __x86_64__
