spa: don't use constructor attribute to register factories

This commit is contained in:
Wim Taymans 2019-02-06 11:38:12 +01:00
parent 30da60ab6b
commit a563050797
7 changed files with 40 additions and 85 deletions

View file

@ -775,7 +775,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
return 1;
}
static const struct spa_handle_factory loop_factory = {
const struct spa_handle_factory spa_support_loop_factory = {
SPA_VERSION_HANDLE_FACTORY,
NAME,
NULL,
@ -783,11 +783,3 @@ static const struct spa_handle_factory loop_factory = {
impl_init,
impl_enum_interface_info
};
int spa_handle_factory_register(const struct spa_handle_factory *factory);
static void reg(void) __attribute__ ((constructor));
static void reg(void)
{
spa_handle_factory_register(&loop_factory);
}