--- spa/tests/test-control.c +++ spa/tests/test-control.c @@ -18,7 +18,9 @@ */ #include +#ifdef __GLIBC__ #include +#endif #include #include #include @@ -358,8 +360,10 @@ static int make_nodes(struct data *data, const char *device) spa_pod_builder_init(&b, buffer, sizeof(buffer)); if ((res = spa_node_port_enum_params(data->source, SPA_DIRECTION_OUTPUT, 0, data->type.param.idIO, &idx, NULL, ¶m, &b)) < 1) { +#ifdef __GLIBC__ if (res < 0) error(0, -res, "port_enum_params"); +#endif break; } @@ -369,19 +373,23 @@ static int make_nodes(struct data *data, const char *device) NULL); if (propId == data->type.props_freq) { +#ifdef __GLIBC__ if ((res = spa_node_port_set_io(data->source, SPA_DIRECTION_OUTPUT, 0, id, &data->ctrl_source_freq, sizeof(data->ctrl_source_freq))) < 0) error(0, -res, "set_io freq"); +#endif } else if (propId == data->type.props_volume) { +#ifdef __GLIBC__ if ((res = spa_node_port_set_io(data->source, SPA_DIRECTION_OUTPUT, 0, id, &data->ctrl_source_volume, sizeof(data->ctrl_source_volume))) < 0) error(0, -res, "set_io volume"); +#endif } } --- spa/tests/test-mixer.c +++ spa/tests/test-mixer.c @@ -18,7 +18,9 @@ */ #include +#ifdef __GLIBC__ #include +#endif #include #include #include @@ -369,8 +371,10 @@ static int make_nodes(struct data *data, const char *device) ":", data->type.props_device, "s", device ? device : "hw:0", ":", data->type.props_min_latency, "i", MIN_LATENCY); +#ifdef __GLIBC__ if ((res = spa_node_set_param(data->sink, data->type.param.idProps, 0, props)) < 0) error(0, -res, "set_param props"); +#endif if ((res = make_node(data, &data->mix, "build/spa/plugins/audiomixer/libspa-audiomixer.so", @@ -453,6 +457,7 @@ static int make_nodes(struct data *data, const char *device) data->ctrl_volume[0] = SPA_POD_DOUBLE_INIT(0.5); data->ctrl_volume[1] = SPA_POD_DOUBLE_INIT(0.5); +#ifdef __GLIBC__ if ((res = spa_node_port_set_io(data->mix, SPA_DIRECTION_INPUT, data->mix_ports[0], data->type.io_inprop_volume, @@ -464,6 +469,7 @@ static int make_nodes(struct data *data, const char *device) data->type.io_inprop_volume, &data->ctrl_volume[1], sizeof(data->ctrl_volume[1]))) < 0) error(0, -res, "set_io volume 1"); +#endif #ifdef USE_GRAPH --- spa/tools/spa-inspect.c +++ spa/tools/spa-inspect.c @@ -17,7 +17,9 @@ * Boston, MA 02110-1301, USA. */ +#ifdef __GLIBC__ #include +#endif #include #include #include @@ -71,8 +73,10 @@ inspect_node_params(struct data *data, struct spa_node *node) if ((res = spa_node_enum_params(node, data->type.param.idList, &idx1, NULL, ¶m, &b)) <= 0) { +#ifdef __GLIBC__ if (res != 0) error(0, -res, "enum_params"); +#endif break; } @@ -88,8 +92,10 @@ inspect_node_params(struct data *data, struct spa_node *node) if ((res = spa_node_enum_params(node, id, &idx2, NULL, ¶m, &b)) <= 0) { +#ifdef __GLIBC__ if (res != 0) error(0, -res, "enum_params %d", id); +#endif break; } spa_debug_pod(param, flags); @@ -115,8 +121,10 @@ inspect_port_params(struct data *data, struct spa_node *node, direction, port_id, data->type.param.idList, &idx1, NULL, ¶m, &b)) <= 0) { +#ifdef __GLIBC__ if (res != 0) error(0, -res, "port_enum_params"); +#endif break; } spa_pod_object_parse(param, @@ -132,8 +140,10 @@ inspect_port_params(struct data *data, struct spa_node *node, direction, port_id, id, &idx2, NULL, ¶m, &b)) <= 0) { +#ifdef __GLIBC__ if (res != 0) error(0, -res, "port_enum_params"); +#endif break; } @@ -214,8 +224,10 @@ static void inspect_factory(struct data *data, const struct spa_handle_factory * if ((res = spa_handle_factory_enum_interface_info(factory, &info, &index)) <= 0) { if (res == 0) break; +#ifdef __GLIBC__ else error(0, -res, "spa_handle_factory_enum_interface_info"); +#endif } printf(" interface: '%s'\n", info->type); @@ -297,8 +309,10 @@ int main(int argc, char *argv[]) const struct spa_handle_factory *factory; if ((res = enum_func(&factory, &index)) <= 0) { +#ifdef __GLIBC__ if (res != 0) error(0, -res, "enum_func"); +#endif break; } inspect_factory(&data, factory);