COMMON_OPTS_INIT: do not use designed initializers

Inside C++, the designed initializers are supported from version c++20
but not supported eg. with GCC 9.4, that is on Ubuntu 20.04.
This commit is contained in:
Martin Pulec
2024-08-07 08:46:29 +02:00
parent 475be643e7
commit 2cd30cbe6f

View File

@@ -178,9 +178,9 @@ struct common_opts {
struct exporter *exporter;
time_ns_t start_time;
#define COMMON_OPTS_INIT \
.encryption = "", .mcast_if = "", .mtu = 1500, .ttl = -1, \
.force_ip_version = 0, .exporter = NULL, \
.start_time = get_time_in_ns(),
/* .encryption = */ "", /* .mcast_if = */ "", /* .mtu = */ 1500, \
/* .ttl = */ -1, /* .force_ip_version = */ 0, /* .exporter = */ NULL, \
/* .start_time = */ get_time_in_ns(),
};
#ifdef __cplusplus