diff --git a/lib/of_api.h b/lib/of_api.h
index 379d922..e689c5f 100644
--- a/lib/of_api.h
+++ b/lib/of_api.h
@@ -21,7 +21,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 
-char *OF_ROOT;
+extern char *OF_ROOT;
 
 struct node_property_t {
 	uint8_t *data;
diff --git a/lib/of_externals.c b/lib/of_externals.c
index 99b478b..6e84f6b 100644
--- a/lib/of_externals.c
+++ b/lib/of_externals.c
@@ -9,6 +9,20 @@
 
 #include "of_api.h"
 
+char *OF_ROOT;
+
+struct device_node *_n_array[256];
+int _n_idx;
+int _n_sem;
+
+struct device_node *_t_array[256];
+int _t_idx;
+int _t_sem;
+	 
+struct device_node *_p_array[2];
+int _p_sem;
+int _p_idx;
+
 void of_init(void)
 {
 	OF_ROOT="/proc/device-tree";
diff --git a/lib/of_externals.h b/lib/of_externals.h
index d8653d2..ab53308 100644
--- a/lib/of_externals.h
+++ b/lib/of_externals.h
@@ -14,17 +14,17 @@
 #define OF_SEARCH_TYPE 0x02
 #define OF_SEARCH_PHDL 0x03
 
-struct device_node *_n_array[256];
-int _n_idx;
-int _n_sem;
+extern struct device_node *_n_array[256];
+extern int _n_idx;
+extern int _n_sem;
 
-struct device_node *_t_array[256];
-int _t_idx;
-int _t_sem;
+extern struct device_node *_t_array[256];
+extern int _t_idx;
+extern int _t_sem;
 
-struct device_node *_p_array[2];
-int _p_sem;
-int _p_idx;
+extern struct device_node *_p_array[2];
+extern int _p_sem;
+extern int _p_idx;
 
 void of_init(void);
 void of_init_root(char *path);
-- 
2.28.0

