net: Move include files outside of extern "C" block

This is related to findings in #17997 and changes network related
header files to have include files outside of extern "C" { } block.

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-08-05 17:18:46 +03:00
commit 5c05ef5101
19 changed files with 68 additions and 74 deletions

View file

@ -13,12 +13,12 @@
#ifndef ZEPHYR_INCLUDE_NET_NET_CORE_H_
#define ZEPHYR_INCLUDE_NET_NET_CORE_H_
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
/**
* @brief Networking
* @defgroup networking Networking