Skip to content

Commit

Permalink
Avoid using gcc aliases
Browse files Browse the repository at this point in the history
which are not supported on MacOS

Fixes brailcom#851
  • Loading branch information
sthibaul committed Aug 11, 2023
1 parent a7c4425 commit 345c207
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
8 changes: 6 additions & 2 deletions src/audio/alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,11 @@ spd_audio_plugin_t *alsa_plugin_get(void)
return &alsa_functions;
}

spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
__attribute__ ((weak, alias("alsa_plugin_get")));
spd_audio_plugin_t *
__attribute__ ((weak))
SPD_AUDIO_PLUGIN_ENTRY(void)
{
return &alsa_functions;
}
#undef MSG
#undef ERR
8 changes: 6 additions & 2 deletions src/audio/libao.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ spd_audio_plugin_t *libao_plugin_get(void)
return &libao_functions;
}

spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
__attribute__ ((weak, alias("libao_plugin_get")));
spd_audio_plugin_t *
__attribute__ ((weak))
SPD_AUDIO_PLUGIN_ENTRY(void)
{
return &libao_functions;
}
#undef MSG
#undef ERR
8 changes: 6 additions & 2 deletions src/audio/nas.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,9 @@ spd_audio_plugin_t *nas_plugin_get(void)
return &nas_functions;
}

spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
__attribute__ ((weak, alias("nas_plugin_get")));
spd_audio_plugin_t *
__attribute__ ((weak))
SPD_AUDIO_PLUGIN_ENTRY(void)
{
return &nas_functions;
}
8 changes: 6 additions & 2 deletions src/audio/oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ spd_audio_plugin_t *oss_plugin_get(void)
return &oss_functions;
}

spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
__attribute__ ((weak, alias("oss_plugin_get")));
spd_audio_plugin_t *
__attribute__ ((weak))
SPD_AUDIO_PLUGIN_ENTRY(void)
{
return &oss_functions;
}
#undef MSG
#undef ERR
8 changes: 6 additions & 2 deletions src/audio/pulse.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,12 @@ spd_audio_plugin_t *pulse_plugin_get(void)
return &pulse_functions;
}

spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
__attribute__ ((weak, alias("pulse_plugin_get")));
spd_audio_plugin_t *
__attribute__ ((weak))
SPD_AUDIO_PLUGIN_ENTRY(void)
{
return &pulse_functions;
}

#undef MSG
#undef ERR

0 comments on commit 345c207

Please sign in to comment.