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
This commit is contained in:
Peter Hutterer 2021-06-10 14:49:44 +10:00
parent 731f45ed50
commit 18b3efa2ed
2 changed files with 8 additions and 3 deletions

View file

@ -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;

View file

@ -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;