ios: Handle libunwind.h header changes.

Xcode 12.5 renamed __personality_routine to _Unwind_Personality_Fn
in usr/include/unwind.h

Bug: crashpad:31
Change-Id: I30316bee6bef8e37b20f4b2512ca3865a6cb21d5
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2686121
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
GitOrigin-RevId: adf40ba77cd633257e3957b6671e70cc1e0a0c50
diff --git a/util/ios/exception_processor.mm b/util/ios/exception_processor.mm
index 616f970..a826681 100644
--- a/util/ios/exception_processor.mm
+++ b/util/ios/exception_processor.mm
@@ -14,6 +14,7 @@
 
 #include "util/ios/exception_processor.h"
 
+#include <Availability.h>
 #import <Foundation/Foundation.h>
 #include <TargetConditionals.h>
 #include <cxxabi.h>
@@ -174,8 +175,13 @@
     }
 
     // Check to see if the handler is really an exception handler.
-    __personality_routine p =
-        reinterpret_cast<__personality_routine>(frame_info.handler);
+#if defined(__IPHONE_14_5) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_5
+    using personality_routine = _Unwind_Personality_Fn;
+#else
+    using personality_routine = __personality_routine;
+#endif
+    personality_routine p =
+        reinterpret_cast<personality_routine>(frame_info.handler);
 
     // From 10.15.0 libunwind-35.4/src/UnwindLevel1.c.
     _Unwind_Reason_Code personalityResult = (*p)(