From 18b3efa2ed9b4a3d1681ce61229884c941be4285 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 10 Jun 2021 14:49:44 +1000 Subject: [PATCH] spa: make two headers compatible with older gcc-c++ c++ 7.5.0 can only initialize structs with continuous members, so let's initialize the fields explicitly to NULL. Fixes #1284 --- spa/include/spa/monitor/utils.h | 3 ++- spa/include/spa/node/utils.h | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/spa/include/spa/monitor/utils.h b/spa/include/spa/monitor/utils.h index a248cc69f..0dd116fd1 100644 --- a/spa/include/spa/monitor/utils.h +++ b/spa/include/spa/monitor/utils.h @@ -59,7 +59,8 @@ static inline int spa_device_enum_params_sync(struct spa_device *device, struct spa_result_device_params_data data = { builder, }; struct spa_hook listener = {{0}}; static const struct spa_device_events device_events = { - SPA_VERSION_DEVICE_EVENTS, + .version = SPA_VERSION_DEVICE_EVENTS, + .info = NULL, .result = spa_result_func_device_params, }; int res; diff --git a/spa/include/spa/node/utils.h b/spa/include/spa/node/utils.h index 35983bd2d..ec02d7b81 100644 --- a/spa/include/spa/node/utils.h +++ b/spa/include/spa/node/utils.h @@ -65,7 +65,9 @@ static inline int spa_node_enum_params_sync(struct spa_node *node, struct spa_result_node_params_data data = { builder, }; struct spa_hook listener = {{0}}; static const struct spa_node_events node_events = { - SPA_VERSION_NODE_EVENTS, + .version = SPA_VERSION_NODE_EVENTS, + .info = NULL, + .port_info = NULL, .result = spa_result_func_node_params, }; int res; @@ -97,7 +99,9 @@ static inline int spa_node_port_enum_params_sync(struct spa_node *node, struct spa_result_node_params_data data = { builder, }; struct spa_hook listener = {{0}}; static const struct spa_node_events node_events = { - SPA_VERSION_NODE_EVENTS, + .version = SPA_VERSION_NODE_EVENTS, + .info = NULL, + .port_info = NULL, .result = spa_result_func_node_params, }; int res;