--- ZoneMinder-1.30.0/src/zm_comms.h +++ ZoneMinder-1.30.0.musl/src/zm_comms.h @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include --- ZoneMinder-1.30.0/src/zm_logger.cpp +++ ZoneMinder-1.30.0.musl/src/zm_logger.cpp @@ -33,8 +33,8 @@ #include #ifdef __FreeBSD__ #include -#include #endif +#include bool Logger::smInitialised = false; Logger *Logger::smInstance = 0; @@ -504,7 +504,8 @@ va_list argPtr; struct timeval timeVal; - const char * const file = basename(filepath); + char *path = strdup(filepath); + const char *file = basename(path); if ( level < PANIC || level > DEBUG9 ) Panic( "Invalid logger level %d", level ); @@ -617,6 +618,8 @@ //priority |= LOG_DAEMON; syslog( priority, "%s [%s]", classString, syslogStart ); } + + free(path); if ( level <= FATAL ) {