diff -ru ipt-orig/include/iptables_common.h ipt-new/include/iptables_common.h --- ipt-orig/include/iptables_common.h 2006-06-19 09:53:03.000000000 -0700 +++ ipt-new/include/iptables_common.h 2006-07-15 12:02:59.000000000 -0700 @@ -33,8 +33,10 @@ extern const char *program_name, *program_version; extern char *lib_dir; +#define _init __attribute__((constructor)) my_init #ifdef NO_SHARED_LIBS # ifdef _INIT +# undef _init # define _init _INIT # endif extern void init_extensions(void); diff -ru ipt-orig/Makefile ipt-new/Makefile --- ipt-orig/Makefile 2006-07-11 14:55:05.000000000 -0700 +++ ipt-new/Makefile 2006-07-15 12:15:23.000000000 -0700 @@ -67,7 +67,7 @@ # The kernel is 64-bit, even though userspace is 32. CFLAGS+=-DIPT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32 else - EXT_LDFLAGS=-m elf64_sparc + EXT_LDFLAGS+=-Wl,-m,elf64_sparc endif endif diff -ru ipt-orig/Rules.make ipt-new/Rules.make --- ipt-orig/Rules.make 2006-05-24 09:11:58.000000000 -0700 +++ ipt-new/Rules.make 2006-07-15 12:02:59.000000000 -0700 @@ -31,7 +31,7 @@ sed -e 's@^.*\.o:@$*.d $*_sh.o:@' > $@ $(SHARED_LIBS): %.so : %_sh.o - $(LD) -shared $(EXT_LDFLAGS) -o $@ $< + $(CC) -shared $(EXT_LDFLAGS) -o $@ $< $(SHARED_SE_LIBS:%.so=%.d): %.d: %.c @-$(CC) -M -MG $(CFLAGS) $< | \