libyang CHANGE headers includes cleanup using include-what-you-use tool (#1098)
diff --git a/tests/utests/data/test_parser_xml.c b/tests/utests/data/test_parser_xml.c
index bda6e7f..e7b16f3 100644
--- a/tests/utests/data/test_parser_xml.c
+++ b/tests/utests/data/test_parser_xml.c
@@ -24,6 +24,7 @@
#include "../../src/context.h"
#include "../../src/tree_data_internal.h"
+#include "../../src/printer.h"
#include "../../src/printer_data.h"
#define BUFSIZE 1024
diff --git a/tests/utests/data/test_printer_xml.c b/tests/utests/data/test_printer_xml.c
index 16e9e5c..b36d8d5 100644
--- a/tests/utests/data/test_printer_xml.c
+++ b/tests/utests/data/test_printer_xml.c
@@ -23,6 +23,7 @@
#include "tests/config.h"
#include "../../src/context.h"
+#include "../../src/printer.h"
#include "../../src/printer_data.h"
#define BUFSIZE 1024
diff --git a/tests/utests/data/test_validation.c b/tests/utests/data/test_validation.c
index fde40de..8934de2 100644
--- a/tests/utests/data/test_validation.c
+++ b/tests/utests/data/test_validation.c
@@ -24,6 +24,7 @@
#include "../../src/context.h"
#include "../../src/tree_data_internal.h"
+#include "../../src/printer.h"
#include "../../src/printer_data.h"
#define BUFSIZE 1024
diff --git a/tests/utests/schema/test_printer_yang.c b/tests/utests/schema/test_printer_yang.c
index a8d5241..9e0f707 100644
--- a/tests/utests/schema/test_printer_yang.c
+++ b/tests/utests/schema/test_printer_yang.c
@@ -21,6 +21,7 @@
#include <string.h>
#include "../../src/context.h"
+#include "../../src/printer.h"
#include "../../src/printer_schema.h"
#define BUFSIZE 1024
diff --git a/tests/utests/schema/test_printer_yin.c b/tests/utests/schema/test_printer_yin.c
index 9dbec76..9991e0f 100644
--- a/tests/utests/schema/test_printer_yin.c
+++ b/tests/utests/schema/test_printer_yin.c
@@ -21,6 +21,7 @@
#include <string.h>
#include "../../src/context.h"
+#include "../../src/printer.h"
#include "../../src/printer_schema.h"
#define BUFSIZE 1024
diff --git a/tests/utests/test_hash_table.c b/tests/utests/test_hash_table.c
index adececa..f705db0 100644
--- a/tests/utests/test_hash_table.c
+++ b/tests/utests/test_hash_table.c
@@ -12,6 +12,8 @@
* https://opensource.org/licenses/BSD-3-Clause
*/
+#define _GNU_SOURCE
+
#include "common.h"
#include "tests/config.h"
diff --git a/tests/utests/test_set.c b/tests/utests/test_set.c
index a4e4332..30a775d 100644
--- a/tests/utests/test_set.c
+++ b/tests/utests/test_set.c
@@ -11,15 +11,17 @@
*
* https://opensource.org/licenses/BSD-3-Clause
*/
-#include "common.h"
+
+#define _GNU_SOURCE
#include <stdarg.h>
#include <stddef.h>
+#include <stdlib.h>
#include <setjmp.h>
-#include <cmocka.h>
-
#include <string.h>
+#include <cmocka.h>
+
#include "../../src/set.h"
#define BUFSIZE 1024
diff --git a/tests/utests/test_xpath.c b/tests/utests/test_xpath.c
index 8f1b533..1552512 100644
--- a/tests/utests/test_xpath.c
+++ b/tests/utests/test_xpath.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "../../src/context.h"
+#include "../../src/set.h"
#include "../../src/tree_data.h"
#include "../../src/tree_schema.h"
diff --git a/tests/utests/test_yanglib.c b/tests/utests/test_yanglib.c
index eb35cff..15afc81 100644
--- a/tests/utests/test_yanglib.c
+++ b/tests/utests/test_yanglib.c
@@ -12,17 +12,20 @@
* https://opensource.org/licenses/BSD-3-Clause
*/
-#include "tests/config.h"
-
#include <stdarg.h>
#include <stddef.h>
+#include <stdlib.h>
#include <setjmp.h>
-#include <cmocka.h>
-
-#include <stdio.h>
#include <string.h>
+#include <cmocka.h>
+
+#include "tests/config.h"
+
#include "../../src/context.h"
+#include "../../src/log.h"
+#include "../../src/set.h"
+#include "../../src/tree_data.h"
#include "../../src/tree_schema.h"
#define BUFSIZE 1024