Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 034fce1

Browse files
dnfieldcommit-bot@chromium.org
authored andcommitted
[dart:io] unbreak build
Change-Id: Ia8965e62f4b89a80aeb6db1489ca45c6db321adc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102640 Reviewed-by: Régis Crelier <[email protected]> Auto-Submit: Dan Field <[email protected]> Commit-Queue: Régis Crelier <[email protected]>
1 parent 7f323fe commit 034fce1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

runtime/bin/security_context_macos.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ static SecCertificateRef CreateSecCertificateFromX509(X509* cert) {
8686
if (length < 0) {
8787
return NULL;
8888
}
89-
auto deb_cert = std::make_unique<unsigned char[]>(length);
90-
auto temp = deb_cert.get();
89+
// This can be `std::make_unique<unsigned char[]>(length)` in C++14
90+
// But the Mac toolchain is still using C++11.
91+
auto deb_cert = std::unique_ptr<unsigned char[]>(new unsigned char[length]);
92+
unsigned char* temp = deb_cert.get();
9193
if (i2d_X509(cert, &temp) != length) {
9294
return NULL;
9395
}

0 commit comments

Comments
 (0)