validation BUGFIX import fix
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 18e29e4..91d9b2c 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -823,8 +823,8 @@
             LY_CHECK_GOTO(ret, cleanup);
 
             /* add any missing default children */
-            ret = lyd_validate_defaults_r((struct lyd_node_inner *)node, lyd_node_children_p(node), NULL, NULL,
-                                          &lybctx->unres_node_type, &lybctx->when_check, lybctx->validate_options);
+            ret = lyd_validate_defaults_r(node, lyd_node_children_p(node), NULL, NULL, &lybctx->unres_node_type,
+                                          &lybctx->when_check, lybctx->validate_options);
             LY_CHECK_GOTO(ret, cleanup);
         }
 
diff --git a/src/parser_xml.c b/src/parser_xml.c
index 2f540f8..c435643 100644
--- a/src/parser_xml.c
+++ b/src/parser_xml.c
@@ -592,8 +592,8 @@
                 LY_CHECK_GOTO(ret, cleanup);
 
                 /* add any missing default children */
-                ret = lyd_validate_defaults_r((struct lyd_node_inner *)cur, lyd_node_children_p(cur), NULL, NULL,
-                                              &lydctx->unres_node_type, &lydctx->when_check, lydctx->options);
+                ret = lyd_validate_defaults_r(cur, lyd_node_children_p(cur), NULL, NULL, &lydctx->unres_node_type,
+                                              &lydctx->when_check, lydctx->options);
                 LY_CHECK_GOTO(ret, cleanup);
             }
 
diff --git a/src/validation.c b/src/validation.c
index a4701e4..799c2bf 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -11,6 +11,7 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#include "validation.h"
 
 #include <assert.h>
 #include <stdint.h>
diff --git a/src/validation.h b/src/validation.h
index 9c6d156..35492af 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -16,6 +16,7 @@
 #define LY_VALIDATION_H_
 
 #include "log.h"
+#include "parser_data.h"
 #include "tree_data.h"
 
 /**
@@ -72,7 +73,7 @@
  * @param[in] val_opts Validation options (@ref datavalidationoptions).
  * @return LY_ERR value.
  */
-LY_ERR lyd_validate_defaults_r(struct lyd_node_inner *parent, struct lyd_node **first, const struct lysc_node *sparent,
+LY_ERR lyd_validate_defaults_r(struct lyd_node *parent, struct lyd_node **first, const struct lysc_node *sparent,
                                const struct lys_module *mod, struct ly_set *node_types, struct ly_set *node_when, int val_opts);
 
 #endif /* LY_VALIDATION_H_ */