openbsd-ports/audio/ladspa/patches/patch-src_plugins_delay_c
espie a6f480686f fix build on amd64, make sure everything is linked correctly.
use ctor/dtor attributes, avoid multiple init/fini definitions.

problem noticed by steven.
2006-08-04 23:34:39 +00:00

28 lines
808 B
Plaintext

$OpenBSD: patch-src_plugins_delay_c,v 1.1 2006/08/04 23:34:39 espie Exp $
--- src/plugins/delay.c.orig Sat Aug 5 01:15:43 2006
+++ src/plugins/delay.c Sat Aug 5 01:16:12 2006
@@ -226,10 +226,13 @@ LADSPA_Descriptor * g_psDescriptor = NUL
/*****************************************************************************/
+void init() __attribute__((constructor));
+void fini() __attribute__((destructor));
+
/* _init() is called automatically when the plugin library is first
loaded. */
void
-_init() {
+init() {
char ** pcPortNames;
LADSPA_PortDescriptor * piPortDescriptors;
@@ -323,7 +326,7 @@ _init() {
/* _fini() is called automatically when the library is unloaded. */
void
-_fini() {
+fini() {
long lIndex;
if (g_psDescriptor) {
free((char *)g_psDescriptor->Label);