NRF Connect SDK DFU seems to be missing stdbool.h

Hi,

I am trying to use the nrf dfu libary at nrf/include/dfu to update firmware on a device using MCUboot. 

Using nrf connect sdk v2.5.2 installed through the nrf connect for desktop toolchain manager and building from nrfconnect for vs code.

On build I receive the following error:

In file included from ../src/firmware_update.c:22:
C:/ncs/v2.5.2/nrf/include/dfu/dfu_target.h:63:21: error: unknown type name 'bool'
63 | int (*done)(bool successful);
| ^~~~
C:/ncs/v2.5.2/nrf/include/dfu/dfu_target.h:18:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
17 | #include <zephyr/types.h>
+++ |+#include <stdbool.h>
18 | // #include <stdbool.h>
C:/ncs/v2.5.2/nrf/include/dfu/dfu_target.h:150:21: error: unknown type name 'bool'
150 | int dfu_target_done(bool successful);
| ^~~~
C:/ncs/v2.5.2/nrf/include/dfu/dfu_target.h:150:21: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?

Adding 

#include <stdbool.h> to line 18 in dfu_target.h solves the problem.

Is this a bug? Or am I missing inclusion of stdbool somewhere else?

I would like to not have to modify the nrf files directly in order to get my code to work.

Related