diff --git a/core/dap_config.c b/core/dap_config.c
index ad575377b1021047030c0c377b91c5aee01656d4..e30c28695c8afadbb3561ffe209765ca622a0ca7 100755
--- a/core/dap_config.c
+++ b/core/dap_config.c
@@ -236,7 +236,8 @@ dap_config_t * dap_config_open(const char * a_name)
                                                 l_item->data_str_array = (char**) malloc (sizeof(char*) * l_item->array_length);
                                                 // parsing items in array
                                                 int j = 0;
-                                                char *token = strtok(values, ",");
+                                                char * l_tmp = NULL;
+                                                char *token = strtok_r(values, ",",&l_tmp);
                                                 while(token) {
 
                                                     // trim token whitespace
@@ -248,7 +249,7 @@ dap_config_t * dap_config_open(const char * a_name)
 
                                                     l_item->data_str_array[j] = strdup(token);
 
-                                                    token = strtok(NULL, ",");
+                                                    token = strtok_r(NULL, ",",&l_tmp);
                                                     j++;
                                                 }
 
diff --git a/core/dap_string.h b/core/dap_string.h
index 6519f6acd17d04f18d8a62590a7647d60760f706..cacb8d0d070e2f7a079f6820e71cb83983f761e2 100755
--- a/core/dap_string.h
+++ b/core/dap_string.h
@@ -5,6 +5,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdint.h>
 
 typedef struct _dap_string dap_string_t;