From 66f8075bc66a7157d2f9b9fe6aae84b8b835435c Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 12 Aug 2019 11:56:05 +0200 Subject: [PATCH] native_posix: Move include out of extern "C" block Related to #17997, move an include out of a extern "C" block Background: 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: Alberto Escolar Piedras --- boards/posix/native_posix/native_rtc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/boards/posix/native_posix/native_rtc.h b/boards/posix/native_posix/native_rtc.h index c3c0cb4889a..7adbc45cfdf 100644 --- a/boards/posix/native_posix/native_rtc.h +++ b/boards/posix/native_posix/native_rtc.h @@ -15,13 +15,12 @@ #include "hw_models_top.h" #include +#include "zephyr/types.h" #ifdef __cplusplus extern "C" { #endif -#include "zephyr/types.h" - /* * Types of clocks this RTC provides: */