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:
parent
d617568b6a
commit
02dbb48fbc
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue