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 e4cac644d2
commit 703309f6cd
7 changed files with 39 additions and 84 deletions

View file

@ -255,7 +255,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
return 1;
}
static const struct spa_handle_factory logger_factory = {
const struct spa_handle_factory spa_support_logger_factory = {
SPA_VERSION_HANDLE_FACTORY,
NAME,
NULL,
@ -263,11 +263,3 @@ static const struct spa_handle_factory logger_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(&logger_factory);
}