Merge pull request #43 from triplef/android-nslog-syslog

Always use syslog for NSLog on Android
This commit is contained in:
rfm 2019-05-20 14:43:09 +01:00 committed by GitHub
commit efc0c603eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,8 +181,10 @@ _NSLog_standard_printf_handler(NSString* message)
#else
#if defined(HAVE_SYSLOG)
#ifndef __ANDROID__ // always use syslog on Android (no stdout/stderr)
if (GSPrivateDefaultsFlag(GSLogSyslog) == YES
|| write(_NSLogDescriptor, buf, len) != (int)len)
#endif
{
null_terminated_buf = malloc(sizeof (char) * (len + 1));
strncpy (null_terminated_buf, buf, len);