This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new adeba2a sys/stats: Fix build error due to circular #include adeba2a is described below commit adeba2a09953f2d065cb62abfa56bcd8d5e92e25 Author: Andrzej Kaczmarek <andrzej.kaczma...@codecoup.pl> AuthorDate: Fri Nov 23 17:29:26 2018 +0100 sys/stats: Fix build error due to circular #include There's possible cicrular #include in stats.h which makes build fail: something.c -> stats/stats.h stats/stats.h -> os/mynewt.h os/mynewt.h with NEWT_FEATURE_LOGCFG -> logcfg/logcfg.h non-empty logcfg/logcfg.h -> modlog/modlog.h modlog/modlog.h -> log/log.h log/log.h with LOG_STATS uses stats macros and tries to include stats.h properly, but since it's implicitly included from stats.h these macros are not yet defined thus there are a lot of build errors in different files. The solution is to include os/os.h since this is what stats.h really needs. --- sys/stats/full/include/stats/stats.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/stats/full/include/stats/stats.h b/sys/stats/full/include/stats/stats.h index 929e08b..0a95baa 100644 --- a/sys/stats/full/include/stats/stats.h +++ b/sys/stats/full/include/stats/stats.h @@ -21,7 +21,7 @@ #include <stddef.h> #include <stdint.h> -#include "os/mynewt.h" +#include "os/os.h" #ifdef __cplusplus extern "C" {