LOG_BACKEND_DEFINE(): use Z_STRUCT_SECTION_ITERABLE()
Replace the open coded section attribute by Z_STRUCT_SECTION_ITERABLE() to properly align structure instances on 64-bit targets. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
caa99b7fed
commit
cd4e7893ea
2 changed files with 2 additions and 3 deletions
|
@ -78,8 +78,7 @@ extern const struct log_backend __log_backends_end[0];
|
|||
.active = false, \
|
||||
.id = 0, \
|
||||
}; \
|
||||
static const struct log_backend _name \
|
||||
__attribute__ ((section(".log_backends"))) __attribute__((used)) = \
|
||||
static const Z_STRUCT_SECTION_ITERABLE(log_backend, _name) = \
|
||||
{ \
|
||||
.api = &_api, \
|
||||
.cb = &UTIL_CAT(backend_cb_, _name), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue