corecollector: fix build with libphobos 2.101

This commit is contained in:
oreo639 2022-12-18 03:32:42 -08:00 committed by Đoàn Trần Công Danh
parent 48eba3e234
commit 5806e43df2

View file

@ -0,0 +1,14 @@
--- a/source/corecollector/logging.d
+++ b/source/corecollector/logging.d
@@ -93,7 +93,10 @@ auto toSyslogLevel(LogLevel lv) @safe
/// Setup the logging with the supplied logging level.
void setupLogging(const LogLevel l, File logFile) @safe
{
- sharedLog = new SyslogLogger(l, logFile);
+ static if (__VERSION__ < 2101)
+ sharedLog = new SyslogLogger(l, logFile);
+ else
+ sharedLog = (() @trusted => cast(shared) new SyslogLogger(l, logFile))();
}
@safe unittest