diff -Nurd -x'*~' qtwebengine-opensource-src-5.7.1.orig/src/3rdparty/chromium/net/cert/x509_certificate_mac.cc qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/net/cert/x509_certificate_mac.cc
--- qtwebengine-opensource-src-5.7.1.orig/src/3rdparty/chromium/net/cert/x509_certificate_mac.cc	2016-11-07 09:46:18.000000000 -0500
+++ qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/net/cert/x509_certificate_mac.cc	2019-11-17 12:48:52.000000000 -0500
@@ -72,7 +72,7 @@
 void GetCertDateForOID(const x509_util::CSSMCachedCertificate& cached_cert,
                        const CSSM_OID* oid,
                        Time* result) {
-  *result = Time::Time();
+  *result = Time();
 
   x509_util::CSSMFieldValue field;
   OSStatus status = cached_cert.GetField(oid, &field);
--- qtwebengine-opensource-src-5.7.1.orig/src/3rdparty/chromium/base/mac/foundation_util.h
+++ qtwebengine-opensource-src-5.7.1/src/3rdparty/chromium/base/mac/foundation_util.h
@@ -52,8 +52,13 @@
 typedef unsigned int NSSearchPathDomainMask;
 #endif
 
+#if defined(OS_IOS) || (defined(MAC_OS_X_VERSION_10_15) && !defined(SECTYPE))
+typedef struct CF_BRIDGED_TYPE(id) __SecACL* SecACLRef;
+typedef struct CF_BRIDGED_TYPE(id) __SecTrustedApplication* SecTrustedApplicationRef;
+#else
 typedef struct OpaqueSecTrustRef* SecACLRef;
 typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef;
+#endif
 
 namespace base {
 
--- qtwebengine-opensource-src-5.7.1/src/core/config/mac_osx.pri	2016-11-30 22:08:16.000000000 -0600
+++ qtwebengine-opensource-src-5.7.1/src/core/config/mac_osx.pri	2020-08-16 04:54:18.000000000 -0500
@@ -9,6 +9,10 @@
      isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
 }
 
+# chromium/build/mac/find_sdk.py expects the SDK version (mac_sdk_min) in Major.Minor format.
+# If Patch version is provided it fails with "Exception: No Major.Minor.Patch+ SDK found"
+QMAKE_MAC_SDK_VERSION_MAJOR_MINOR = $$section(QMAKE_MAC_SDK_VERSION, ".", 0, 1)
+
 QMAKE_CLANG_DIR = "/usr"
 QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
 !isEmpty(QMAKE_CLANG_PATH) {
@@ -21,7 +25,7 @@
 system("$${QMAKE_CLANG_PATH} --version")
 GYP_CONFIG += \
     qt_os=\"mac\" \
-    mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \
+    mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION_MAJOR_MINOR}\" \
     mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
     make_clang_dir=\"$${QMAKE_CLANG_DIR}\" \
     clang_use_chrome_plugins=0 \
diff -Nurd -x'*~' qtwebengine-opensource-src-5.7.1.orig/tools/qmake/mkspecs/features/default_pre.prf qtwebengine-opensource-src-5.7.1/tools/qmake/mkspecs/features/default_pre.prf
--- qtwebengine-opensource-src-5.7.1.orig/tools/qmake/mkspecs/features/default_pre.prf	2016-11-30 23:08:16.000000000 -0500
+++ qtwebengine-opensource-src-5.7.1/tools/qmake/mkspecs/features/default_pre.prf	2019-11-17 12:48:52.000000000 -0500
@@ -2,7 +2,7 @@
 QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,)
 
 # We depend on libc++ to build chromium so our macosx-version-min has to be 10.7
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
+QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
 
 QTWEBENGINEPROCESS_NAME_RELEASE = QtWebEngineProcess
 debug_and_release {
diff -Nurd -x'*~' qtwebengine-opensource-src-5.7.1.orig/tools/qmake/mkspecs/features/functions.prf qtwebengine-opensource-src-5.7.1/tools/qmake/mkspecs/features/functions.prf
--- qtwebengine-opensource-src-5.7.1.orig/tools/qmake/mkspecs/features/functions.prf	2016-11-30 23:08:16.000000000 -0500
+++ qtwebengine-opensource-src-5.7.1/tools/qmake/mkspecs/features/functions.prf	2019-11-17 12:55:27.000000000 -0500
@@ -23,7 +23,7 @@
       skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
     }
   } else:osx {
-    lessThan(QMAKE_XCODE_VERSION, 6.1) {
+    !isMinXcodeVersion(6, 1) {
       skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 6.1 is required to build Qt WebEngine.")
       return(false)
     }
@@ -134,6 +134,26 @@
     return(false)
 }
 
+defineTest(isMinXcodeVersion) {
+    requested_major = $$1
+    requested_minor = $$2
+    requested_patch = $$3
+    isEmpty(requested_minor): requested_minor = 0
+    isEmpty(requested_patch): requested_patch = 0
+    target_var = QMAKE_XCODE_VERSION
+    major_version = $$section($$target_var, ., 0, 0)
+    minor_version = $$section($$target_var, ., 1, 1)
+    patch_version = $$section($$target_var, ., 2, 2)
+    isEmpty(minor_version): minor_version = 0
+    isEmpty(patch_version): patch_version = 0
+
+    greaterThan(major_version, $$requested_major):return(true)
+    equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true)
+    equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true)
+
+    return(false)
+}
+
 # Map to the correct target type for gyp
 defineReplace(toGypTargetType) {
   equals(TEMPLATE, "app"):return("executable")
