summaryrefslogtreecommitdiffstats
path: root/main/zoneminder/musl-fix.patch
blob: fd48cd55c509330823d2220272cf378aff8d9995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- ZoneMinder-1.29.0/src/zm_comms.h
+++ ZoneMinder-1.29.0.musl/src/zm_comms.h
@@ -26,6 +26,8 @@
 #include <unistd.h>
 #include <netdb.h>
 #include <errno.h>
+#include <string.h>
+#include <sys/uio.h>
 #include <sys/un.h>
 
 #include <set>
--- ZoneMinder-1.29.0/src/zm_logger.cpp
+++ ZoneMinder-1.29.0.musl/src/zm_logger.cpp
@@ -33,8 +33,8 @@
 #include <errno.h>
 #ifdef __FreeBSD__
 #include <sys/thr.h>
-#include <libgen.h>
 #endif
+#include <libgen.h>
 
 bool Logger::smInitialised = false;
 Logger *Logger::smInstance = 0;
@@ -504,7 +504,9 @@
         va_list         argPtr;
         struct timeval  timeVal;
 
-        const char * const file = basename(filepath);
+        char *s = strdup(filepath);
+        const char * const file = basename(s);
+        free(s);
         
         if ( level < PANIC || level > DEBUG9 )
             Panic( "Invalid logger level %d", level );