From 4a5a32466958dab49b9940e4528ee6d523f4a5ac Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 16 Mar 2017 19:09:39 -0700 Subject: [PATCH] dart_runtime_hooks: revert to syslog() call (#3484) Fixes buildbot error use of undeclared identifier 'asl_log_message', which I'm unable to repro locally. --- lib/ui/dart_runtime_hooks.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ui/dart_runtime_hooks.cc b/lib/ui/dart_runtime_hooks.cc index 1b43c88aa..aa028ddb3 100644 --- a/lib/ui/dart_runtime_hooks.cc +++ b/lib/ui/dart_runtime_hooks.cc @@ -28,7 +28,10 @@ #endif #if __APPLE__ -#include +extern "C" { +// Cannot import the syslog.h header directly because of macro collision +extern void syslog(int, const char*, ...); +} #endif using tonic::LogIfError; @@ -154,7 +157,7 @@ void Logger_PrintString(Dart_NativeArguments args) { __android_log_print(ANDROID_LOG_INFO, tag, "%.*s", (int)length, chars); #elif __APPLE__ - asl_log_message(ASL_LEVEL_NOTICE, "%.*s", (int)length, chars); + syslog(1 /* LOG_ALERT */, "%.*s", (int)length, chars); #endif } if (dart::bin::ShouldCaptureStdout()) { -- GitLab