libyang BUGFIX cleanup of headers includes
diff --git a/compat/compat.h.in b/compat/compat.h.in
index ab76584..b69a339 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -15,7 +15,7 @@
 #ifndef _COMPAT_H_
 #define _COMPAT_H_
 
-#include <stdarg.h>
+#include <limits.h>
 #include <stdio.h>
 #include <sys/types.h>
 
diff --git a/src/parser.h b/src/parser.h
index 0ef7088..214534b 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -16,7 +16,6 @@
 #define LY_PARSER_H_
 
 #include <stdio.h>
-#include <unistd.h>
 
 #include "log.h"
 
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 2710751..74ff62b 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -15,14 +15,18 @@
 #include "lyb.h"
 
 #include <assert.h>
-#include <errno.h>
-#include <inttypes.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "common.h"
 #include "compat.h"
+#include "context.h"
+#include "dict.h"
+#include "log.h"
+#include "set.h"
+#include "tree.h"
 #include "tree_data_internal.h"
 #include "tree_schema.h"
 #include "validation.h"
diff --git a/src/path.c b/src/path.c
index 47ef657..c620b86 100644
--- a/src/path.c
+++ b/src/path.c
@@ -18,12 +18,15 @@
 #include <assert.h>
 #include <ctype.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "common.h"
 #include "compat.h"
 #include "log.h"
 #include "plugins_types.h"
+#include "set.h"
 #include "tree_data_internal.h"
+#include "tree_schema.h"
 #include "tree_schema_internal.h"
 #include "xpath.h"
 
diff --git a/src/path.h b/src/path.h
index c75387c..3c2df75 100644
--- a/src/path.h
+++ b/src/path.h
@@ -15,12 +15,15 @@
 #ifndef LY_PATH_H_
 #define LY_PATH_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include "log.h"
 #include "tree.h"
 #include "tree_data.h"
 
+struct ly_ctx;
+struct lys_module;
 struct lysc_node;
 struct lyxp_expr;
 
diff --git a/src/plugins_types.c b/src/plugins_types.c
index b26f16b..3ebcc0b 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -30,7 +30,6 @@
 #include "path.h"
 #include "set.h"
 #include "tree.h"
-#include "tree_data_internal.h"
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
 #include "xml.h"
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 0d95bbd..411622b 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -19,12 +19,19 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/types.h>
 
 #include "common.h"
 #include "compat.h"
+#include "config.h"
+#include "context.h"
+#include "hash_table.h"
 #include "log.h"
 #include "printer.h"
+#include "printer_data.h"
 #include "printer_internal.h"
+#include "set.h"
+#include "tree.h"
 #include "tree_data_internal.h"
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index f7a2920..36d540c 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -15,10 +15,14 @@
 #include <assert.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "common.h"
 #include "context.h"
+#include "hash_table.h"
 #include "log.h"
+#include "lyb.h"
+#include "set.h"
 #include "tree.h"
 #include "tree_data.h"
 #include "tree_data_internal.h"
diff --git a/src/tree_schema.h b/src/tree_schema.h
index 1be7c3f..6bb16ee 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -30,7 +30,6 @@
 extern "C" {
 #endif
 
-struct ly_path;
 struct ly_ctx;
 struct ly_set;
 
diff --git a/src/tree_schema_free.c b/src/tree_schema_free.c
index f13dd1b..58ac788 100644
--- a/src/tree_schema_free.c
+++ b/src/tree_schema_free.c
@@ -16,7 +16,6 @@
 
 #include "common.h"
 #include "config.h"
-#include "path.h"
 #include "plugins_exts.h"
 #include "plugins_types.h"
 #include "tree.h"
diff --git a/src/xpath.h b/src/xpath.h
index 316f535..72858dd 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -16,6 +16,7 @@
 #define LY_XPATH_H
 
 #include <stdint.h>
+#include <stddef.h>
 
 #include "config.h"
 #include "log.h"