Skip to content

Fix compiling issue in config.h to not include dpp.h

Muhannad Alrifaai requested to merge bt/map-agent:fix_compiling_issue into devel

Since there are definitions in config.h which are defined in dpp.h, it should be included. This issue has been discovered when we included config.h in new file, then compiler raised error like the following:

config.h:200:33: error: field 'type' has incomplete type
  200 |         enum dpp_bootstrap_type type;
      |                                 ^~~~
config.h:202:30: error: 'DPP_MAX_CH_OPCLASS' undeclared here (not in a function)
  202 |         struct dpp_chan chan[DPP_MAX_CH_OPCLASS];
      |                              ^~~~~~~~~~~~~~~~~~
In file included from nvlan.c:38:
agent.h:321:26: error: field 'creds' has incomplete type
  321 |         struct dpp_creds creds;
      |                          ^~~~~
agent.h:322:34: error: field 'dpp_state' has incomplete type
  322 |         enum dpp_responder_state dpp_state;
      |                                  ^~~~~~~~~
agent.h:686:28: error: field 'dpp_ctx' has incomplete type
  686 |         struct dpp_context dpp_ctx;
      |                            ^~~~~~~
make[3]: *** [Makefile:58: nvlan.o] Error 1

so it is better to include dpp.h in config.h to avoid dependency on "includer" to include dpp.h before config.h

Merge request reports