1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

log: fix unsupported flag on musl-libc / alpine

This commit is contained in:
Steffen Vogel 2021-07-13 11:27:12 +02:00
parent d617568b6a
commit 02dbb48fbc

View file

@ -77,7 +77,12 @@ Logger Log::get(const std::string &name)
logger->set_pattern(prefix + pattern);
for (auto &expr : expressions) {
if (!fnmatch(expr.name.c_str(), name.c_str(), FNM_EXTMATCH))
int flags = 0;
#ifdef FNM_EXTMATCH
/* musl-libc doesnt support this flag yet */
flags |= FNM_EXTMATCH;
#endif
if (!fnmatch(expr.name.c_str(), name.c_str(), flags))
logger->set_level(expr.level);
}