兼容 asr1903

Change-Id: I3888f1adc86ea1fa73af4996d31f40223c0e5735
diff --git a/mbtk/mbtk_logd/Makefile b/mbtk/mbtk_logd/Makefile
index 2ef7531..22368ba 100755
--- a/mbtk/mbtk_logd/Makefile
+++ b/mbtk/mbtk_logd/Makefile
@@ -9,7 +9,7 @@
 
 LIBS += -lubus -lubox -ljson-c -lblobmsg_json -lmbtk_lib
 
-CFLAGS +=
+CFLAGS += -Wno-error=unused-but-set-variable -Wno-error=stringop-overflow
 
 DEFINE +=
 
diff --git a/mbtk/mbtk_logd/main.c b/mbtk/mbtk_logd/main.c
index 4cd4888..d2ba2b8 100755
--- a/mbtk/mbtk_logd/main.c
+++ b/mbtk/mbtk_logd/main.c
@@ -100,8 +100,9 @@
                     if (_filter_list->tag && _filter_list->tag[0] != '\0') {
                         free(_filter_list->tag);
                     }
-                    free(_filter_list);
+					struct filter_list_t* tmp_filter_list = _filter_list;
                     _filter_list = _filter_list->next;
+					free(tmp_filter_list);
                 } else {
                     break;
                 }
diff --git a/mbtk/mbtk_logd/socket_read.c b/mbtk/mbtk_logd/socket_read.c
index 7b54051..32e6844 100755
--- a/mbtk/mbtk_logd/socket_read.c
+++ b/mbtk/mbtk_logd/socket_read.c
@@ -12,6 +12,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <pthread.h>
+#include <string.h>
 
 #include "log_config.h"
 
diff --git a/mbtk/mbtk_logd/syslog_read.c b/mbtk/mbtk_logd/syslog_read.c
index 04bedb0..2f4c9a7 100755
--- a/mbtk/mbtk_logd/syslog_read.c
+++ b/mbtk/mbtk_logd/syslog_read.c
@@ -91,7 +91,7 @@
 static struct file_list_t file_list;
 static struct filter_list_t *filter_log = NULL;
 static char tmp_log[100] = {0};
-pthread_t attr = -1;
+pthread_t attr;
 
 static const char* getcodetext(int value, CODE *codetable) {
 	CODE *i;
@@ -432,8 +432,10 @@
 
     while(tmp_filter_list != NULL) {
 		_filter_list = tmp_filter_list;
-        free(tmp_filter_list);
+		
+		struct filter_list_t* list_ptr = tmp_filter_list;
         tmp_filter_list = _filter_list->next;
+		free(list_ptr);
     }
 
     return 0;