openbsd-ports/audio/ladspa/patches/patch-src_plugins_amp_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
836 B
Plaintext

$OpenBSD: patch-src_plugins_amp_c,v 1.1 2006/08/04 23:34:39 espie Exp $
--- src/plugins/amp.c.orig Sat Aug 5 01:10:01 2006
+++ src/plugins/amp.c Sat Aug 5 01:13:05 2006
@@ -150,10 +150,13 @@ LADSPA_Descriptor * g_psStereoDescriptor
/*****************************************************************************/
+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;
@@ -336,7 +339,7 @@ deleteDescriptor(LADSPA_Descriptor * psD
/* _fini() is called automatically when the library is unloaded. */
void
-_fini() {
+fini() {
deleteDescriptor(g_psMonoDescriptor);
deleteDescriptor(g_psStereoDescriptor);
}