--- libpurple/plugins/perl/Makefile.am.dist 2010-03-11 10:18:51.361992000 +0000 +++ libpurple/plugins/perl/Makefile.am 2010-03-11 10:39:55.078415200 +0000 @@ -4,7 +4,7 @@ perl_dirs = common plugin_LTLIBRARIES = perl.la -perl_la_LDFLAGS = -module -avoid-version +perl_la_LDFLAGS = -module -avoid-version -Wl,-init -Wl,my_init perl_la_LIBADD = $(GLIB_LIBS) $(PERL_LIBS) perl_la_SOURCES = \ perl.c \ --- libpurple/plugins/perl/perl.c.dist 2010-03-11 10:04:24.489350400 +0000 +++ libpurple/plugins/perl/perl.c 2010-03-11 10:05:36.741857600 +0000 @@ -697,6 +697,12 @@ init_plugin(PurplePlugin *plugin) loader_info.exts = g_list_append(loader_info.exts, "pl"); } +/* If we're not using GNU C, elide __attribute__ */ +/* If we're also not on Sun, then the linker will have to handle this */ +#ifndef __GNUC__ +#define __attribute__(x) /*NOTHING*/ +#endif + #ifdef __SUNPRO_C #pragma init (my_init) #else