Commit b35ae328 by Abseil Team Committed by Copybara-Service

Import of CCTZ from GitHub.

PiperOrigin-RevId: 457997580
Change-Id: I39d007d4f93c02e07ad660df13d9f63e786182f8
parent 736458b5
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#if defined(__Fuchsia__) #if defined(__Fuchsia__)
#include <fuchsia/intl/cpp/fidl.h> #include <fuchsia/intl/cpp/fidl.h>
#include <lib/async-loop/cpp/loop.h> #include <lib/async-loop/cpp/loop.h>
#include <lib/sys/cpp/component_context.h> #include <lib/fdio/directory.h>
#include <zircon/types.h> #include <zircon/types.h>
#endif #endif
...@@ -160,11 +160,11 @@ time_zone local_time_zone() { ...@@ -160,11 +160,11 @@ time_zone local_time_zone() {
// would be set to null when the loop is destroyed, causing any other FIDL // would be set to null when the loop is destroyed, causing any other FIDL
// code running on the same thread to crash. // code running on the same thread to crash.
async::Loop loop(&kAsyncLoopConfigNeverAttachToThread); async::Loop loop(&kAsyncLoopConfigNeverAttachToThread);
std::unique_ptr<sys::ComponentContext> context =
sys::ComponentContext::Create();
fuchsia::intl::PropertyProviderHandle handle; fuchsia::intl::PropertyProviderHandle handle;
zx_status_t status = context->svc()->Connect(handle.NewRequest()); zx_status_t status = fdio_service_connect_by_name(
fuchsia::intl::PropertyProvider::Name_,
handle.NewRequest().TakeChannel().release());
if (status != ZX_OK) { if (status != ZX_OK) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment