diff --git a/usr.bin/dtc/dtb.cc b/usr.bin/dtc/dtb.cc index d7aecba02800..6346d63cc0af 100644 --- a/usr.bin/dtc/dtb.cc +++ b/usr.bin/dtc/dtb.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc index 494604e191df..3c7b2a8bd9ab 100644 --- a/usr.bin/dtc/fdt.cc +++ b/usr.bin/dtc/fdt.cc @@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input, { input.next_token(); // Read the header - if (input.consume("/dts-v1/;")) + while (input.consume("/dts-v1/;")) { read_header = true; + input.next_token(); } - input.next_token(); if (input.consume("/plugin/;")) { is_plugin = true;