diff --git a/include/dap_strfuncs.h b/include/dap_strfuncs.h
index 4ea6871f90339fd58414aee1efd2bec0eea20201..1786c84e0e98444e282d4dbc4cdab36fb0fee63a 100755
--- a/include/dap_strfuncs.h
+++ b/include/dap_strfuncs.h
@@ -74,15 +74,7 @@ char* dap_strdown(const char *a_str, ssize_t a_len);
 char* dap_strreverse(char *a_string);
 
 #ifdef _WIN32
-inline char *strndup(char *str, unsigned long len) {
-    char *buf = memchr(str, '\0', len);
-    if (buf)
-        len = buf - str;
-    buf = malloc(len + 1);
-    memcpy(buf, str, len);
-    buf[len] = '\0';
-    return buf;
-}
+char *strndup(char *str, unsigned long len);
 #endif
 
 #define DAP_USEC_PER_SEC 1000000
diff --git a/src/dap_common.c b/src/dap_common.c
index d3c10bbd1c212743445842a03c69fdfd8fe3b80a..56bc9fd1627628f4a7886b6f95df5d4209e8eafa 100755
--- a/src/dap_common.c
+++ b/src/dap_common.c
@@ -204,7 +204,7 @@ int dap_common_init( const char *a_console_title, const char *a_log_filename ) {
 
     // init randomer
     srand( (unsigned int)time(NULL) );
-    //SetupConsole( a_console_title, L"Lucida Console", 12, 20 ); // TODO: remove this useless crap completely
+    (void) a_console_title;
     strncpy( s_log_tag_fmt_str, "[%s]\t",sizeof (s_log_tag_fmt_str));
     for (int i = 0; i < 16; ++i)
             s_ansi_seq_color_len[i] =(unsigned int) strlen(s_ansi_seq_color[i]);
diff --git a/src/dap_strfuncs.c b/src/dap_strfuncs.c
index fee3ecdbedce5cdde72ae57823df1410a5718649..eb7b677239fa8d3fa411a2f0fbae19a95d4c0953 100755
--- a/src/dap_strfuncs.c
+++ b/src/dap_strfuncs.c
@@ -682,13 +682,23 @@ char* dap_strreverse(char *a_string)
     return a_string;
 }
 
-#ifndef DAP_OS_UNIX
+#ifdef _WIN32
 char *strptime( char *buff, const char *fmt, struct tm *tm ) {
   uint32_t len = strlen( buff );
   dap_sscanf( buff,"%u.%u.%u_%u.%u.%u",&tm->tm_year, &tm->tm_mon, &tm->tm_mday, &tm->tm_hour, &tm->tm_min, &tm->tm_sec );
   tm->tm_year += 2000;
   return buff + len;
 }
+
+char *strndup(char *str, unsigned long len) {
+    char *buf = (char*)memchr(str, '\0', len);
+    if (buf)
+        len = buf - str;
+    buf = (char*)malloc(len + 1);
+    memcpy(buf, str, len);
+    buf[len] = '\0';
+    return buf;
+}
 #endif
 
 /**