]> git.proxmox.com Git - mirror_frr.git/commit
lib: fix c++ usage of zlog
authorEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 22 Feb 2021 09:29:55 +0000 (10:29 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 22 Feb 2021 09:38:42 +0000 (10:38 +0100)
commitc364a0962b0c7b93ff7f7801ec805e6ea25e1a5a
treedb03b7e19dbc76b3a2e9fcdc935cf862b719e51c
parent2031dbf31cfbe7e6fb0028b34054db5d92de05d2
lib: fix c++ usage of zlog

Since some recent commit, building c++ code attempting to use zlog_debug
(or any other level) would fail with the following complaint:

lib/zlog.h:91:3: sorry, unimplemented: non-trivial designated
initializers not supported
   };
   ^
lib/zlog.h:105:26: note: in expansion of macro ‘_zlog_ref’
 #define zlog_debug(...)  _zlog_ref(LOG_DEBUG, __VA_ARGS__)

This is due to out-of-order initialization of the xrefdata struct
fields. Setting them all in the order in which they are defined
fixes the issue.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
lib/zlog.h